gcc 2.95 doesn't know about -Wno-unused-parameter
Jorge, I suppose you're getting tired of hearing about my ancient Redhat system, but my gcc doesn't believe in -Wno-unused-parameters, preferning "-Wno-unused". Easy enough to fix by hand. Perhaps I should look nto configure in my copious spare time. Thanks, -- -- David McKee -- dmckee@jlab.org -- (757) 269-7492 (Office)
On Sun, 23 Nov 2003, David McKee wrote:
Jorge, I suppose you're getting tired of hearing about my ancient Redhat system, but my gcc doesn't believe in -Wno-unused-parameters, preferning "-Wno-unused".
Easy enough to fix by hand.
-Wno-unused is a different thing: it eliminates all the "unused" type warnings. That's not the desired effect (`info gcc` for details). If you add a simple way to test whether gcc accepts the warning option, in configure.in, it'd be ok.
Perhaps I should look nto configure in my copious spare time.
Cheers Jorge.-
* Jorge Arellano Cid (jcid@dillo.org) wrote:
If you add a simple way to test whether gcc accepts the warning option, in configure.in, it'd be ok.
As he's hardly the only one still using 2.95.x it would probably be a good idea to have that testing-procedure in the main configure.in - or do you have any objection? - Victor
Hi
I suppose you're getting tired of hearing about my ancient Redhat system, but my gcc doesn't believe in -Wno-unused-parameters, preferning
Same on FreeBSD which also still uses 2.95. I think there are lots of systems that still use gcc2.95
If you add a simple way to test whether gcc accepts the warning option, in configure.in, it'd be ok.
Attached is a patch wich does just that. However, it assumes that the -Wno-unused-parameters appeared with version 3 of gcc. A quick google search seems to confirm that this option was introduced with gcc 3.0 - can anybody with gcc 3.0 confirm that ? The patch also fixes some problems with detection of /usr/local in the default path. This patch works on a FreeBSD 4.8 system (gcc 2.95) and a Suse 8.2 system (gcc3.2). Cheers Andreas -- **************************** NEW ADDRESS ****************************** Hamburger Sternwarte Universitaet Hamburg Gojenbergsweg 112 Tel. ++49 40 42891 4016 D-21029 Hamburg, Germany Fax. ++49 40 42891 4198
On Tue, 25 Nov 2003, Andreas Schweitzer wrote:
Hi
I suppose you're getting tired of hearing about my ancient Redhat system, but my gcc doesn't believe in -Wno-unused-parameters, preferning
Same on FreeBSD which also still uses 2.95. I think there are lots of systems that still use gcc2.95
If you add a simple way to test whether gcc accepts the warning option, in configure.in, it'd be ok.
Attached is a patch wich does just that. However, it assumes that the -Wno-unused-parameters appeared with version 3 of gcc. A quick google search seems to confirm that this option was introduced with gcc 3.0 - can anybody with gcc 3.0 confirm that ?
The patch also fixes some problems with detection of /usr/local in the default path.
This patch works on a FreeBSD 4.8 system (gcc 2.95) and a Suse 8.2 system (gcc3.2).
Commited. Does it work for you David? Cheers Jorge.-
On Tue, 2 Dec 2003, Jorge Arellano Cid wrote:
On Tue, 25 Nov 2003, Andreas Schweitzer wrote: [attribution to me lost]
my gcc doesn't believe in -Wno-unused-parameters, [snip] Attached is a patch [snip] Commited. Does it work for you David?
Perfectly. Thanks. -- -- David McKee -- dmckee@jlab.org -- (757) 269-7492 (Office)
On Tue, 2 Dec 2003, David McKee wrote:
On Tue, 2 Dec 2003, Jorge Arellano Cid wrote:
On Tue, 25 Nov 2003, Andreas Schweitzer wrote: [attribution to me lost]
my gcc doesn't believe in -Wno-unused-parameters, [snip] Attached is a patch [snip] Commited. Does it work for you David?
Perfectly. Thanks.
Having said that on the basis of my gcc 2.95 based debian machine at home, I tried it on my work machine. The Redhat box actual uses: $ gcc -v Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/specs gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release) *sigh* My attempts to read the auto<whatever> docs last week were very depressing, so I just looked at configure.in, and ponied up this fix: ========== --- dillo/configure.in Wed Dec 3 11:48:31 2003 +++ dillo_tweaked/configure.in Wed Dec 3 11:32:18 2003 @@ -201,7 +201,9 @@ if eval "test x$GCC = xyes"; then fi if test "`echo $CFLAGS | grep '\-W[^a]' 2> /dev/null`" = ""; then if test "`$CC -v 2>&1 | grep 'version 2'`" = ""; then - CFLAGS="$CFLAGS -W -Wno-unused-parameter" + if test "`$CC -v 2>&1 | grep 'version egcs-2'`" = ""; then + CFLAGS="$CFLAGS -W -Wno-unused-parameter" + fi fi fi if test "`echo $CFLAGS | grep '\-Waggregate-return' 2> /dev/null`" = ""; then ========== which simply adds anther test to exclude gcc 2.* based egcs releases before sticking in the new flags... Style question: Would it be better to test for the presence of the flag than to try to exclude those compilers without it? Anyway, thanks for the work. -- -- David McKee -- dmckee@jlab.org -- (757) 269-7492 (Office)
participants (4)
-
Andreas Schweitzer
-
David McKee
-
Jorge Arellano Cid
-
Victor Sahlstedt