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

Reply via email to