tzlaine / parser

A C++ parser combinator library.
Boost Software License 1.0
70 stars 12 forks source link

Clang compiler warnings #87

Closed akrzemi1 closed 5 months ago

akrzemi1 commented 5 months ago

The usage of "expectation" operator and and a sequence operator in one parser causes warnings to be displayed about the operator precedence:

https://godbolt.org/z/xxGc8jod3

Even without -Wall. I know that it is difficult to do something about it. Maybe clang should be contacted to stop warning about the operator precedence for user provided operators? Or parser classes need to be tagged in a way clang understands.

tzlaine commented 5 months ago

There's nothing I can do about this. You can parenthesize the expression however you like, and it will not change its meaning. You can also push/pop warning disablements.

akrzemi1 commented 5 months ago

FYI: https://github.com/llvm/llvm-project/issues/80538