[Bug c++/12258] New: -Wold-style-cast triggers on casts in macros from system headers
stl at caltech dot edu
gcc-bugzilla@gcc.gnu.org
Fri Sep 12 01:58:00 GMT 2003
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.
More information about the Gcc-bugs
mailing list