This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/12258] New: -Wold-style-cast triggers on casts in macros from system headers


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]