* [Bug bootstrap/51388] Configure failure to detect unsupported warning options for non-bootstrap builds (including cross builds)
2011-12-02 13:33 [Bug bootstrap/51388] New: Configure failure to detect unsupported warning options for non-bootstrap builds (including cross builds) steven at gcc dot gnu.org
@ 2011-12-02 14:51 ` rguenth at gcc dot gnu.org
2011-12-02 14:53 ` rguenth at gcc dot gnu.org
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-12-02 14:51 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51388
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
Last reconfirmed| |2011-12-02
CC| |jsm28 at gcc dot gnu.org
Ever Confirmed|0 |1
--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-12-02 14:51:14 UTC ---
I think the issue is that we allow random -Wno- as argument, but not
positive variants. Trunk:
> ./xgcc -B. -c t.c -Wno-foo
> ./xgcc -B. -c t.c -Wfoo
xgcc: error: unrecognized command line option '-Wfoo'
that's probably deliberate. So the bug is that we check for
-Wno-narrowing instead of -Wnarrowing.
Now, the question is why we don't consistently error in 4.3 ...
I see
> gcc-4.3 -c -Wno-narrowing t.c -DHAVE_ARG
cc1: error: unrecognized command line option "-Wno-narrowing"
with FSF GCC 4.3.6. So, are you sure this isn't behavior caused by
vendor patches? (openSUSE GCC 4.3 also works)
Still the behavior of warning for -Wno- changed appearantly. Joseph?
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug bootstrap/51388] Configure failure to detect unsupported warning options for non-bootstrap builds (including cross builds)
2011-12-02 13:33 [Bug bootstrap/51388] New: Configure failure to detect unsupported warning options for non-bootstrap builds (including cross builds) steven at gcc dot gnu.org
2011-12-02 14:51 ` [Bug bootstrap/51388] " rguenth at gcc dot gnu.org
@ 2011-12-02 14:53 ` rguenth at gcc dot gnu.org
2011-12-02 14:59 ` stevenb.gcc at gmail dot com
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-12-02 14:53 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51388
--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-12-02 14:52:49 UTC ---
Since 4.4.0 we no longer warn for unrecognized -Wno- forms, thus the configure
check is broken as-is.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug bootstrap/51388] Configure failure to detect unsupported warning options for non-bootstrap builds (including cross builds)
2011-12-02 13:33 [Bug bootstrap/51388] New: Configure failure to detect unsupported warning options for non-bootstrap builds (including cross builds) steven at gcc dot gnu.org
2011-12-02 14:51 ` [Bug bootstrap/51388] " rguenth at gcc dot gnu.org
2011-12-02 14:53 ` rguenth at gcc dot gnu.org
@ 2011-12-02 14:59 ` stevenb.gcc at gmail dot com
2011-12-02 15:01 ` steven at gcc dot gnu.org
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: stevenb.gcc at gmail dot com @ 2011-12-02 14:59 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51388
--- Comment #3 from stevenb.gcc at gmail dot com <stevenb.gcc at gmail dot com> 2011-12-02 14:59:37 UTC ---
On Fri, Dec 2, 2011 at 3:51 PM, rguenth at gcc dot gnu.org
<gcc-bugzilla@gcc.gnu.org> wrote:
> I see
>
>> gcc-4.3 -c -Wno-narrowing t.c -DHAVE_ARG
> cc1: error: unrecognized command line option "-Wno-narrowing"
>
> with FSF GCC 4.3.6. So, are you sure this isn't behavior caused by
> vendor patches? (openSUSE GCC 4.3 also works)
What do you see with "gcc-4.3 -c -Wno-narrowing t.c"?
FWIW this is Debian GCC 4.3.2-1.1 on gcc17.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug bootstrap/51388] Configure failure to detect unsupported warning options for non-bootstrap builds (including cross builds)
2011-12-02 13:33 [Bug bootstrap/51388] New: Configure failure to detect unsupported warning options for non-bootstrap builds (including cross builds) steven at gcc dot gnu.org
` (2 preceding siblings ...)
2011-12-02 14:59 ` stevenb.gcc at gmail dot com
@ 2011-12-02 15:01 ` steven at gcc dot gnu.org
2011-12-02 16:10 ` joseph at codesourcery dot com
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: steven at gcc dot gnu.org @ 2011-12-02 15:01 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51388
Steven Bosscher <steven at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |NEW
--- Comment #4 from Steven Bosscher <steven at gcc dot gnu.org> 2011-12-02 15:01:15 UTC ---
Confirmed per #2
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug bootstrap/51388] Configure failure to detect unsupported warning options for non-bootstrap builds (including cross builds)
2011-12-02 13:33 [Bug bootstrap/51388] New: Configure failure to detect unsupported warning options for non-bootstrap builds (including cross builds) steven at gcc dot gnu.org
` (3 preceding siblings ...)
2011-12-02 15:01 ` steven at gcc dot gnu.org
@ 2011-12-02 16:10 ` joseph at codesourcery dot com
2011-12-02 16:21 ` rguenth at gcc dot gnu.org
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: joseph at codesourcery dot com @ 2011-12-02 16:10 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51388
--- Comment #5 from joseph at codesourcery dot com <joseph at codesourcery dot com> 2011-12-02 16:09:57 UTC ---
On Fri, 2 Dec 2011, rguenth at gcc dot gnu.org wrote:
> Still the behavior of warning for -Wno- changed appearantly. Joseph?
The idea was that if an unknown -Wno- option is passed, but there were no
warnings, it doesn't matter that we don't know what warnings the -Wno-
option might have been intended to disable because there were no warnings
at all for it to disable - so diagnosis of unknown -Wno- options is
deferred and they are only diagnosed if some other warning (that the
unknown option might potentially have been intended to disable) is given.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug bootstrap/51388] Configure failure to detect unsupported warning options for non-bootstrap builds (including cross builds)
2011-12-02 13:33 [Bug bootstrap/51388] New: Configure failure to detect unsupported warning options for non-bootstrap builds (including cross builds) steven at gcc dot gnu.org
` (4 preceding siblings ...)
2011-12-02 16:10 ` joseph at codesourcery dot com
@ 2011-12-02 16:21 ` rguenth at gcc dot gnu.org
2011-12-02 16:49 ` steven at gcc dot gnu.org
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-12-02 16:21 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51388
--- Comment #6 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-12-02 16:20:56 UTC ---
(In reply to comment #3)
> On Fri, Dec 2, 2011 at 3:51 PM, rguenth at gcc dot gnu.org
> <gcc-bugzilla@gcc.gnu.org> wrote:
> > I see
> >
> >> gcc-4.3 -c -Wno-narrowing t.c -DHAVE_ARG
> > cc1: error: unrecognized command line option "-Wno-narrowing"
> >
> > with FSF GCC 4.3.6. So, are you sure this isn't behavior caused by
> > vendor patches? (openSUSE GCC 4.3 also works)
>
> What do you see with "gcc-4.3 -c -Wno-narrowing t.c"?
>
> FWIW this is Debian GCC 4.3.2-1.1 on gcc17.
> /space/rguenther/install/gcc-4.3.2/bin/gcc -c -Wno-narrowing t.c
cc1: error: unrecognized command line option "-Wno-narrowing"
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug bootstrap/51388] Configure failure to detect unsupported warning options for non-bootstrap builds (including cross builds)
2011-12-02 13:33 [Bug bootstrap/51388] New: Configure failure to detect unsupported warning options for non-bootstrap builds (including cross builds) steven at gcc dot gnu.org
` (5 preceding siblings ...)
2011-12-02 16:21 ` rguenth at gcc dot gnu.org
@ 2011-12-02 16:49 ` steven at gcc dot gnu.org
2011-12-02 17:00 ` manu at gcc dot gnu.org
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: steven at gcc dot gnu.org @ 2011-12-02 16:49 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51388
--- Comment #7 from Steven Bosscher <steven at gcc dot gnu.org> 2011-12-02 16:48:45 UTC ---
(In reply to comment #1)
> Now, the question is why we don't consistently error in 4.3 ...
>
> I see
>
> > gcc-4.3 -c -Wno-narrowing t.c -DHAVE_ARG
> cc1: error: unrecognized command line option "-Wno-narrowing"
>
> with FSF GCC 4.3.6. So, are you sure this isn't behavior caused by
> vendor patches? (openSUSE GCC 4.3 also works)
I think this is due to the patch "pr28322.dpatch" in the Debian GCC 4.3.2-1.1
package. IIUC that patch is also in GCC 4.4. Is that something you can confirm?
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug bootstrap/51388] Configure failure to detect unsupported warning options for non-bootstrap builds (including cross builds)
2011-12-02 13:33 [Bug bootstrap/51388] New: Configure failure to detect unsupported warning options for non-bootstrap builds (including cross builds) steven at gcc dot gnu.org
` (6 preceding siblings ...)
2011-12-02 16:49 ` steven at gcc dot gnu.org
@ 2011-12-02 17:00 ` manu at gcc dot gnu.org
2011-12-19 13:13 ` schwab at gcc dot gnu.org
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: manu at gcc dot gnu.org @ 2011-12-02 17:00 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51388
--- Comment #8 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2011-12-02 16:59:30 UTC ---
(In reply to comment #5)
> On Fri, 2 Dec 2011, rguenth at gcc dot gnu.org wrote:
>
> > Still the behavior of warning for -Wno- changed appearantly. Joseph?
>
> The idea was that if an unknown -Wno- option is passed, but there were no
> warnings, it doesn't matter that we don't know what warnings the -Wno-
> option might have been intended to disable because there were no warnings
> at all for it to disable - so diagnosis of unknown -Wno- options is
> deferred and they are only diagnosed if some other warning (that the
> unknown option might potentially have been intended to disable) is given.
That is right. This was requested precisely by Debian GCC maintainers. In fact,
clang seems to follow gcc now, except that they only warn (instead of error)
for unknown positive options:
manuel@gcc12:~$ ~/bin/clang++ pr42356.cc -Wwhatever
warning: unknown warning option '-Wwhatever' [-Wunknown-warning-option]
In any case, how is it -Wno-long-long tested by configure? I guess configure
could test whether "-Wnarrowing -Wno-narrowing" is accepted, or test with a
testcase that triggers a default warning like "1/0".
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug bootstrap/51388] Configure failure to detect unsupported warning options for non-bootstrap builds (including cross builds)
2011-12-02 13:33 [Bug bootstrap/51388] New: Configure failure to detect unsupported warning options for non-bootstrap builds (including cross builds) steven at gcc dot gnu.org
` (7 preceding siblings ...)
2011-12-02 17:00 ` manu at gcc dot gnu.org
@ 2011-12-19 13:13 ` schwab at gcc dot gnu.org
2011-12-20 14:47 ` andreast at gcc dot gnu.org
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: schwab at gcc dot gnu.org @ 2011-12-19 13:13 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51388
--- Comment #9 from Andreas Schwab <schwab at gcc dot gnu.org> 2011-12-19 13:12:31 UTC ---
Author: schwab
Date: Mon Dec 19 13:12:26 2011
New Revision: 182478
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=182478
Log:
Check for warning flags without no- prefix
config/:
PR bootstrap/51388
* warnings.m4 (ACX_PROG_CC_WARNING_OPTS)
(ACX_PROG_CC_WARNING_ALMOST_PEDANTIC): Run the test without the
no- prefix.
fixincludes/:
* configure: Regenerate.
gcc/:
* configure: Regenerate.
libcpp/:
* configure: Regenerate.
libdecnumber/:
* configure: Regenerate.
libiberty/:
* configure: Regenerate.
lto-plugin/:
* configure: Regenerate.
Modified:
trunk/config/ChangeLog
trunk/config/warnings.m4
trunk/fixincludes/ChangeLog
trunk/fixincludes/configure
trunk/gcc/ChangeLog
trunk/gcc/configure
trunk/libcpp/ChangeLog
trunk/libcpp/configure
trunk/libdecnumber/ChangeLog
trunk/libdecnumber/configure
trunk/libiberty/ChangeLog
trunk/libiberty/configure
trunk/lto-plugin/ChangeLog
trunk/lto-plugin/configure
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug bootstrap/51388] Configure failure to detect unsupported warning options for non-bootstrap builds (including cross builds)
2011-12-02 13:33 [Bug bootstrap/51388] New: Configure failure to detect unsupported warning options for non-bootstrap builds (including cross builds) steven at gcc dot gnu.org
` (8 preceding siblings ...)
2011-12-19 13:13 ` schwab at gcc dot gnu.org
@ 2011-12-20 14:47 ` andreast at gcc dot gnu.org
2011-12-20 15:58 ` schwab@linux-m68k.org
2011-12-20 16:10 ` andreast at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: andreast at gcc dot gnu.org @ 2011-12-20 14:47 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51388
Andreas Tobler <andreast at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |andreast at gcc dot gnu.org
--- Comment #10 from Andreas Tobler <andreast at gcc dot gnu.org> 2011-12-20 14:42:03 UTC ---
-Wno-*) option=-W`expr $real_option : '-Wno-\(.*\)'` ;;
The expr on FreeBSD treats leading minus (-) in an expression as an option.
Therefor this does not work there. I'm trying to find a solution.
One would be to remove the leading minus.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug bootstrap/51388] Configure failure to detect unsupported warning options for non-bootstrap builds (including cross builds)
2011-12-02 13:33 [Bug bootstrap/51388] New: Configure failure to detect unsupported warning options for non-bootstrap builds (including cross builds) steven at gcc dot gnu.org
` (9 preceding siblings ...)
2011-12-20 14:47 ` andreast at gcc dot gnu.org
@ 2011-12-20 15:58 ` schwab@linux-m68k.org
2011-12-20 16:10 ` andreast at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: schwab@linux-m68k.org @ 2011-12-20 15:58 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51388
--- Comment #11 from Andreas Schwab <schwab@linux-m68k.org> 2011-12-20 15:48:28 UTC ---
Does this work?
diff --git a/config/warnings.m4 b/config/warnings.m4
index 292e5a4..b64b594 100644
--- a/config/warnings.m4
+++ b/config/warnings.m4
@@ -32,7 +32,7 @@ for real_option in $1; do
# Do the check with the no- prefix removed since gcc silently
# accepts any -Wno-* option on purpose
case $real_option in
- -Wno-*) option=-W`expr $real_option : '-Wno-\(.*\)'` ;;
+ -Wno-*) option=-W`expr x$real_option : 'x-Wno-\(.*\)'` ;;
*) option=$real_option ;;
esac
AS_VAR_PUSHDEF([acx_Woption], [acx_cv_prog_cc_warning_$option])
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug bootstrap/51388] Configure failure to detect unsupported warning options for non-bootstrap builds (including cross builds)
2011-12-02 13:33 [Bug bootstrap/51388] New: Configure failure to detect unsupported warning options for non-bootstrap builds (including cross builds) steven at gcc dot gnu.org
` (10 preceding siblings ...)
2011-12-20 15:58 ` schwab@linux-m68k.org
@ 2011-12-20 16:10 ` andreast at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: andreast at gcc dot gnu.org @ 2011-12-20 16:10 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51388
--- Comment #12 from Andreas Tobler <andreast at gcc dot gnu.org> 2011-12-20 15:57:36 UTC ---
Seems to work. At least in stage one, compiling gcc.
Thank you!
^ permalink raw reply [flat|nested] 13+ messages in thread