This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/12258] New: -Wold-style-cast triggers on casts in macros from system headers
- From: "stl at caltech dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Sep 2003 01:58:49 -0000
- Subject: [Bug c++/12258] New: -Wold-style-cast triggers on casts in macros from system headers
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12258
Summary: -Wold-style-cast triggers on casts in macros from system
headers
Product: gcc
Version: 3.3
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: stl at caltech dot edu
CC: gcc-bugs at gcc dot gnu dot org
See this thread:
http://gcc.gnu.org/ml/gcc/2003-09/msg00162.html
Basically, if something like
#pragma GCC system_header
#define NOTHING (int) 0
appears in something.h, and meow.cc consists of
#include <something.h>
int blah = NOTHING;
and meow.cc is compiled with -Wold-style-cast, the warning will trigger.
I originally encountered this using MinGW gcc 3.3, but Zack Weinberg's
comments in the thread indicate that no version of gcc anywhere yet knows
enough to not emit this warning.