This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/61081] excessive warnings: right-hand operand of comma expression has no effect
- From: "manu at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 08 May 2014 08:44:25 +0000
- Subject: [Bug c/61081] excessive warnings: right-hand operand of comma expression has no effect
- Auto-submitted: auto-generated
- References: <bug-61081-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61081
Manuel LÃpez-IbÃÃez <manu at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |manu at gcc dot gnu.org
--- Comment #5 from Manuel LÃpez-IbÃÃez <manu at gcc dot gnu.org> ---
Apple should mark their system headers as such using:
#pragma GCC system_header
Other compilers will ignore this pragma.
You could do that simply by adding a dummy header that includes the real
header. Or you can just disable the warning in your code with #pragma GCC
diagnostic ignore "Wwhatever".
We could also not warn if the right-hand operand comes from the macro
definition, but I am not sure how difficult is to do that and whether it is
really worth the effort.