GCC Bugzilla has been upgraded from version 4.4.9 to 5.0rc3. If you see any problem, please report it to bug 64968.
Bug 22511 - [3.4 Regression] cc1plus: error: unrecognized command line option "-Wno-pointer-sign"
Summary: [3.4 Regression] cc1plus: error: unrecognized command line option "-Wno-point...
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: other (show other bugs)
Version: 3.4.0
: P2 minor
Target Milestone: 3.4.5
Assignee: Not yet assigned to anyone
URL:
Keywords: diagnostic
Depends on:
Blocks:
 
Reported: 2005-07-16 14:08 UTC by eric.valette
Modified: 2005-08-31 13:25 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work: 4.0.0 4.1.0 4.0.1
Known to fail: 3.4.0 3.3.3 3.2.3
Last reconfirmed: 2005-07-16 14:23:17


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description eric.valette 2005-07-16 14:08:31 UTC
Handling of -Wno-pointer-sign when used with g++ is not consistent with other C
specific warning option (at least -Wstrict-prototypes -Wdeclaration-after-statement)

May I suggest to also emit a warning instead of an error as many people use
CXXFLAGS= $(CFLAGS) + $(c++ specific options)


cc1plus: warning: command line option "-Wstrict-prototypes" is valid for
Ada/C/ObjC but not for C++
cc1plus: warning: command line option "-Wdeclaration-after-statement" is valid
for C/ObjC but not for C++
cc1plus: error: unrecognized command line option "-Wno-pointer-sign"
Comment 1 Andrew Pinski 2005-07-16 14:23:16 UTC
Confirmed. Only a 3.4 regression.
4.0.0 and 4.0.1 (and the mainline) produces:
cc1plus: warning: command line option "-Wno-pointer-sign" is valid for C/ObjC but not for C++
3.0.4 produced no warning or error.
2.95.3 did not have "-Wpointer-sign" so we errored out when using "-Wno-pointer-sign".
Comment 2 eric.valette 2005-07-16 14:32:42 UTC
Yes you are right g++ is :
g++ -v
Reading specs from /usr/lib/gcc/i486-linux-gnu/3.4.5/specs
Configured with: ../src/configure -v
--enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr
--libexecdir=/usr/lib --with-gxx-include-dir=/usr/include/c++/3.4
--enable-shared --with-system-zlib --enable-nls --without-included-gettext
--program-suffix=-3.4 --enable-__cxa_atexit --enable-libstdcxx-allocator=mt
--enable-clocale=gnu --enable-libstdcxx-debug --enable-java-gc=boehm
--enable-java-awt=gtk --disable-werror i486-linux-gnu
Thread model: posix
gcc version 3.4.5 20050706 (prerelease) (Debian 3.4.4-5)

Thanks for you quick response
Comment 3 Richard Biener 2005-08-31 13:25:48 UTC
3.4 does not contain such option at all.  I wonder in what way 3.0.4 was
special in this regard ;)