https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60759

--- Comment #7 from Vincent Lefèvre <vincent-gcc at vinc17 dot net> ---
(In reply to Manuel López-Ibáñez from comment #6)
> I believe this is on purpose to avoid too much noise.  The warning in GCC
> needs to be smarter about types and macros and avoid early folding.

Well, for the case constant-logical-operand, the warning on X || Y should be on
"true" constants X and Y (which is stricter than what __builtin_constant_p
regards as constants). I don't think that there would be much noise in this
case, or this could be a separate macro like clang's
-Wconstant-logical-operand, thus which can easily be enabled/disabled.

Reply via email to