ukoethe / vigra

a generic C++ library for image analysis
http://ukoethe.github.io/vigra/
Other
407 stars 191 forks source link

Unnecessary parenthesis detection on GCC9 #479

Closed eldruin closed 4 years ago

eldruin commented 4 years ago

Our GCC9 build reports an unnecessary parenthesis error in this code:

template< typename Predicate >
failure ************ (Predicate::************ 
      assertImpl( void (*)(Predicate), typename Predicate::not_type )
    );

The exact message is:

include/vigra/static_assert.hxx:87 unnecessary parentheses in declaration of ‘assertImpl’ [-Werror=parentheses]

Would it be possible to change those messages?

hmeine commented 4 years ago

I could finally reproduce it in a docker with gcc9 and a simple make check in a fresh vigra checkout, many dependencies missing:

In file included from /vigra/include/vigra/tinyvector.hxx:57,
                 from /vigra/include/vigra/voxelneighborhood.hxx:39,
                 from /vigra/test/voxelneighborhood/test.cxx:42:
/vigra/include/vigra/static_assert.hxx: At global scope:
/vigra/include/vigra/static_assert.hxx:87:22: warning: unnecessary parentheses in declaration of 'assertImpl' [-Wparentheses]
   87 | failure ************ (Predicate::************
      |                      ^
hmeine commented 4 years ago

Fixed in aaaf44d240aebd0eb3539b6e105a19a984000d81