ukoethe/vigra

Unnecessary parenthesis detection on GCC9

Closed this issue · 2 comments

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?

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::************
      |                      ^

Fixed in aaaf44d