[Bug c/37186] New: -Wno-error=pointer-sign does not work
edwintorok at gmail dot com
gcc-bugzilla@gcc.gnu.org
Thu Aug 21 13:16:00 GMT 2008
Doesn't work, it still considers these warnings as errors:
$ gcc-4.3 x.c -c -Wall -Werror -Wno-error=pointer-sign
cc1: warnings being treated as errors
x.c: In function ÂbarÂ:
x.c:4: error: pointer targets in passing argument 1 of Âfoo differ in
signedness
$ gcc-4.3 x.c -c -Wpointer-sign -Werror -Wno-error=pointer-sign
cc1: warnings being treated as errors
x.c: In function ÂbarÂ:
x.c:4: error: pointer targets in passing argument 1 of Âfoo differ in
signedness
This of course works, but I don't see the warning anymore:
$ gcc-4.3 x.c -c -Wall -Werror -Wno-pointer-sign
$ echo $?
0
$ gcc-4.3 -v
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.3.1-9'
--with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3
--program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug
--enable-objc-gc --enable-mpfr --enable-cld --enable-checking=release
--build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.3.1 (Debian 4.3.1-9)
$ cat x.c
int foo(signed char *);
int bar(unsigned char *p)
{
return foo(p);
}
--
Summary: -Wno-error=pointer-sign does not work
Product: gcc
Version: 4.3.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: edwintorok at gmail dot com
GCC build triplet: Linux lightspeed2 2.6.26-1-amd64 #1 SMP Fri Aug 8
13:17:41 UTC 2
GCC host triplet: Linux lightspeed2 2.6.26-1-amd64 #1 SMP Fri Aug 8
13:17:41 UTC 2
GCC target triplet: Linux lightspeed2 2.6.26-1-amd64 #1 SMP Fri Aug 8
13:17:41 UTC 2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37186
More information about the Gcc-bugs
mailing list