Open NotZahar opened 1 month ago
gcc 13 gives the following:
../lexy/lexy/dsl/punctuator.hpp:15:26: error: unnecessary parentheses in declaration of ‘period’ [-Werror=parentheses] 15 | inline constexpr auto(Name) = _##Name {} | ^~~~~~ ../lexy/lexy/dsl/punctuator.hpp:17:1: note: in expansion of macro ‘LEXY_PUNCT’ 17 | LEXY_PUNCT(period, "."); | ^~~~~~~~~~ ../lexy/lexy/dsl/punctuator.hpp:15:26: note: remove parentheses 15 | inline constexpr auto(Name) = _##Name {} | ^~~~~~ ../lexy/lexy/dsl/punctuator.hpp:17:1: note: in expansion of macro ‘LEXY_PUNCT’ 17 | LEXY_PUNCT(period, "."); | ^~~~~~~~~~ ../lexy/lexy/dsl/punctuator.hpp:15:26: error: unnecessary parentheses in declaration of ‘comma’ [-Werror=parentheses] 15 | inline constexpr auto(Name) = _##Name {} | ^~~~~~ ../lexy/lexy/dsl/punctuator.hpp:18:1: note: in expansion of macro ‘LEXY_PUNCT’ 18 | LEXY_PUNCT(comma, ","); | ^~~~~~~~~~ ../lexy/lexy/dsl/punctuator.hpp:15:26: note: remove parentheses 15 | inline constexpr auto(Name) = _##Name {} | ^~~~~~ ../lexy/lexy/dsl/punctuator.hpp:18:1: note: in expansion of macro ‘LEXY_PUNCT’ 18 | LEXY_PUNCT(comma, ","); | ^~~~~~~~~~ ../lexy/lexy/dsl/punctuator.hpp:15:26: error: unnecessary parentheses in declaration of ‘colon’ [-Werror=parentheses] 15 | inline constexpr auto(Name) = _##Name {} | ^~~~~~ ../lexy/lexy/dsl/punctuator.hpp:19:1: note: in expansion of macro ‘LEXY_PUNCT’ 19 | LEXY_PUNCT(colon, ":"); | ^~~~~~~~~~ ../lexy/lexy/dsl/punctuator.hpp:15:26: note: remove parentheses 15 | inline constexpr auto(Name) = _##Name {} | ^~~~~~ ../lexy/lexy/dsl/punctuator.hpp:19:1: note: in expansion of macro ‘LEXY_PUNCT’ 19 | LEXY_PUNCT(colon, ":"); | ^~~~~~~~~~ ...
May be this line (from punctuator.hpp:15):
inline constexpr auto(Name) = _##Name {}
Should be replaced by:
inline constexpr auto Name = _##Name {}
Hm, I think then I had a warning about macro arguments not being parenthesized :D Can you do a PR with the fix and see what the CI system says? Thanks.
https://github.com/foonathan/lexy/pull/207
gcc 13 gives the following:
May be this line (from punctuator.hpp:15):
Should be replaced by: