Package: g++-4.7 Version: 4.7.1-7 Severity: normal Hi,
Contrary to gcc, g++ ignore "#pragma GCC diagnostic ...". Note that the GNU doc tell us that g++ support most of gcc pragma. Moreover, g++ does not emit a warning about unknown pragma as it does for typo. Example: vdanjean@eyak:/tmp$ cat toto.cpp #pragma GCC diagnostic ignored "-Wcpp" #warning this is a warning vdanjean@eyak:/tmp$ g++-4.7 -Wall -c toto.cpp toto.cpp:2:2: warning: #warning this is a warning [-Wcpp] vdanjean@eyak:/tmp$ gcc-4.7 --language=c -Wall -c toto.cpp vdanjean@eyak:/tmp$ Example that shows that the previous pragma is recongnized but ignored with various typo that make g++ emit other warnings: vdanjean@eyak:/tmp$ cat titi.cpp #pragma GCC wrong-pragma ignored "-Wcpp" #pragma GXX diagnostic ignored "-Wcpp" #pragma GCC diagnostic ignored "-Wwrong-option" #warning this is a warning vdanjean@eyak:/tmp$ g++-4.7 -Wall -c titi.cpp titi.cpp:1:0: warning: ignoring #pragma GCC wrong [-Wunknown-pragmas] titi.cpp:2:0: warning: ignoring #pragma GXX diagnostic [-Wunknown-pragmas] titi.cpp:4:2: warning: #warning this is a warning [-Wcpp] titi.cpp:3:32: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas] vdanjean@eyak:/tmp$ So "#pragma GCC diagnostic ignored "-Wcpp"" has been correctly recognized in toto.cpp but ignored. Regards, Vincent -- System Information: Debian Release: wheezy/sid APT prefers unstable APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 armel mipsel Kernel: Linux 3.2.0-3-amd64 (SMP w/8 CPU cores) Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages g++-4.7 depends on: ii gcc-4.7 4.7.1-7 ii gcc-4.7-base 4.7.1-7 ii libc6 2.13-35 ii libgmp10 2:5.0.5+dfsg-2 ii libmpc2 0.9-4 ii libmpfr4 3.1.0-5 ii libstdc++6-4.7-dev 4.7.1-7 ii zlib1g 1:1.2.7.dfsg-13 g++-4.7 recommends no packages. Versions of packages g++-4.7 suggests: ii g++-4.7-multilib 4.7.1-7 pn gcc-4.7-doc <none> pn libstdc++6-4.7-dbg <none> -- no debconf information -- To UNSUBSCRIBE, email to debian-gcc-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20120829151025.29213.89415.report...@eyak.imag.fr