Paweł Hajdan
Paweł Hajdan

Reputation: 18542

Which gcc switch disables "left-hand operand of comma has no effect" warning?

It's a part of larger code base, which forces -Werror on gcc. This warning is generated in a third party code that shouldn't be changed (and I actually know how to fix it), but I can disable specific warnings. This time man gcc failed me, so please, let some gcc master enlighten me. TIA.

Upvotes: 0

Views: 1628

Answers (3)

JesperE
JesperE

Reputation: 64404

If you use -fdiagnostics-show-option, GCC will tell you how to disable a warning (if possible).

Upvotes: 5

Florian Bösch
Florian Bösch

Reputation: 27766

It is the -Wno-unused-value option, see the documentation

Upvotes: 6

Tyler
Tyler

Reputation: 28874

Have you tried using a diagnostic pragma directive? These are available in gcc 4.2.1+, I believe.

Upvotes: 0

Related Questions