This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/61412] Warnings incorrectly suppressed when compiling previously preprocessed file
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 04 Jun 2014 16:31:02 +0000
- Subject: [Bug c++/61412] Warnings incorrectly suppressed when compiling previously preprocessed file
- Auto-submitted: auto-generated
- References: <bug-61412-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61412
--- Comment #11 from Jonathan Wakely <redi at gcc dot gnu.org> ---
cat > sys/h.h <<EOT
#define X(I) char c = { I }
EOT
cat > C.C << EOT
#include <h.h>
int main () {
int i = 256;
X(i);
}
EOT
g++ -isystem sys C.C -Wall
g++ -isystem sys C.C -Wall -Wsystem-headers
In file included from C.C:1:0:
C.C: In function âint main()â:
C.C:4:3: warning: narrowing conversion of âiâ from âintâ to âcharâ inside { }
is ill-formed in C++11 [-Wnarrowing]
X(i);
^