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++/32256] New: pragma system_header doesn't suppress warnings in tree-cfg


Hi, this header (header.h):

#pragma GCC system_header
int noreturn() { }

included by (file.cc):

#include "header.h"
void ok() { }

Leads to:

paolo:~/Work> g++ -Wall -c file.cc
header.h: In function 'int noreturn()':
header.h:2: warning: control reaches end of non-void function

Note, this problem doesn't happen if file.cc is compiled as C, thus the problem
apparently is the C++ front-end not setting TREE_NO_WARNING on the decl or
something similar...


-- 
           Summary: pragma system_header doesn't suppress warnings in tree-
                    cfg
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pcarlini at suse dot de


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32256


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