public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Unbreak bootstrap with GCC 4.3 (PR bootstrap/77751)
@ 2016-09-27  9:44 Marek Polacek
  2016-09-27 10:01 ` Jakub Jelinek
  2016-09-27 10:32 ` Richard Biener
  0 siblings, 2 replies; 5+ messages in thread
From: Marek Polacek @ 2016-09-27  9:44 UTC (permalink / raw)
  To: GCC Patches

GCC 4.3 stupidly errors on this with
error: unrecognized command line option "-Wno-implicit-fallthrough"
so use -Wno-error instead.

Bootstrapped on x86_64-linux, ok for trunk?

2016-09-27  Marek Polacek  <polacek@redhat.com>

	PR bootstrap/77751
	* Makefile.in (insn-attrtab.o-warn, insn-dfatab.o-warn,
	insn-latencytab.o-warn, insn-output.o-warn, insn-emit.o-warn): Use
	-Wno-error instead of -Wno-implicit-fallthrough.

diff --git gcc/Makefile.in gcc/Makefile.in
index e8559cb..ff12908 100644
--- gcc/Makefile.in
+++ gcc/Makefile.in
@@ -218,11 +218,11 @@ libgcov-merge-tool.o-warn = -Wno-error
 gimple-match.o-warn = -Wno-unused
 generic-match.o-warn = -Wno-unused
 dfp.o-warn = -Wno-strict-aliasing
-insn-attrtab.o-warn = -Wno-implicit-fallthrough
-insn-dfatab.o-warn = -Wno-implicit-fallthrough
-insn-latencytab.o-warn = -Wno-implicit-fallthrough
-insn-output.o-warn = -Wno-implicit-fallthrough
-insn-emit.o-warn = -Wno-implicit-fallthrough
+insn-attrtab.o-warn = -Wno-error
+insn-dfatab.o-warn = -Wno-error
+insn-latencytab.o-warn = -Wno-error
+insn-output.o-warn = -Wno-error
+insn-emit.o-warn = -Wno-error
 
 # All warnings have to be shut off in stage1 if the compiler used then
 # isn't gcc; configure determines that.  WARN_CFLAGS will be either

	Marek

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Unbreak bootstrap with GCC 4.3 (PR bootstrap/77751)
  2016-09-27  9:44 Unbreak bootstrap with GCC 4.3 (PR bootstrap/77751) Marek Polacek
@ 2016-09-27 10:01 ` Jakub Jelinek
  2016-09-27 10:22   ` Andreas Schwab
  2016-09-27 10:32 ` Richard Biener
  1 sibling, 1 reply; 5+ messages in thread
From: Jakub Jelinek @ 2016-09-27 10:01 UTC (permalink / raw)
  To: Marek Polacek; +Cc: GCC Patches

On Tue, Sep 27, 2016 at 11:40:19AM +0200, Marek Polacek wrote:
> GCC 4.3 stupidly errors on this with
> error: unrecognized command line option "-Wno-implicit-fallthrough"
> so use -Wno-error instead.

I'm not sure I like this, then we'll see even during stage2/stage3 lots of
warnings in those files and other kinds of errors will not be reported.
And, the surrounding lines show that we already use -Wno-unused or
-Wno-strict-aliasing on other files.

My preference would be configure test for whether -Wno-implicit-fallthrough
works, and using @W_NO_IMPLICIT_FALLTHROUGH@ in there or something similar
(or stick that into a make variable and use $(W_NO_IMPLICIT_FALLTHROUGH)).
> 
> Bootstrapped on x86_64-linux, ok for trunk?
> 
> 2016-09-27  Marek Polacek  <polacek@redhat.com>
> 
> 	PR bootstrap/77751
> 	* Makefile.in (insn-attrtab.o-warn, insn-dfatab.o-warn,
> 	insn-latencytab.o-warn, insn-output.o-warn, insn-emit.o-warn): Use
> 	-Wno-error instead of -Wno-implicit-fallthrough.
> 
> diff --git gcc/Makefile.in gcc/Makefile.in
> index e8559cb..ff12908 100644
> --- gcc/Makefile.in
> +++ gcc/Makefile.in
> @@ -218,11 +218,11 @@ libgcov-merge-tool.o-warn = -Wno-error
>  gimple-match.o-warn = -Wno-unused
>  generic-match.o-warn = -Wno-unused
>  dfp.o-warn = -Wno-strict-aliasing
> -insn-attrtab.o-warn = -Wno-implicit-fallthrough
> -insn-dfatab.o-warn = -Wno-implicit-fallthrough
> -insn-latencytab.o-warn = -Wno-implicit-fallthrough
> -insn-output.o-warn = -Wno-implicit-fallthrough
> -insn-emit.o-warn = -Wno-implicit-fallthrough
> +insn-attrtab.o-warn = -Wno-error
> +insn-dfatab.o-warn = -Wno-error
> +insn-latencytab.o-warn = -Wno-error
> +insn-output.o-warn = -Wno-error
> +insn-emit.o-warn = -Wno-error
>  
>  # All warnings have to be shut off in stage1 if the compiler used then
>  # isn't gcc; configure determines that.  WARN_CFLAGS will be either
> 
> 	Marek

	Jakub

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Unbreak bootstrap with GCC 4.3 (PR bootstrap/77751)
  2016-09-27 10:01 ` Jakub Jelinek
@ 2016-09-27 10:22   ` Andreas Schwab
  0 siblings, 0 replies; 5+ messages in thread
From: Andreas Schwab @ 2016-09-27 10:22 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Marek Polacek, GCC Patches

On Sep 27 2016, Jakub Jelinek <jakub@redhat.com> wrote:

> On Tue, Sep 27, 2016 at 11:40:19AM +0200, Marek Polacek wrote:
>> GCC 4.3 stupidly errors on this with
>> error: unrecognized command line option "-Wno-implicit-fallthrough"
>> so use -Wno-error instead.
>
> I'm not sure I like this, then we'll see even during stage2/stage3 lots of
> warnings in those files and other kinds of errors will not be reported.
> And, the surrounding lines show that we already use -Wno-unused or
> -Wno-strict-aliasing on other files.
>
> My preference would be configure test for whether -Wno-implicit-fallthrough
> works, and using @W_NO_IMPLICIT_FALLTHROUGH@ in there or something similar
> (or stick that into a make variable and use $(W_NO_IMPLICIT_FALLTHROUGH)).

Perhaps some general construct that suppresses -Wno-foo in stage1 only?

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Unbreak bootstrap with GCC 4.3 (PR bootstrap/77751)
  2016-09-27  9:44 Unbreak bootstrap with GCC 4.3 (PR bootstrap/77751) Marek Polacek
  2016-09-27 10:01 ` Jakub Jelinek
@ 2016-09-27 10:32 ` Richard Biener
  2016-09-27 10:48   ` Marek Polacek
  1 sibling, 1 reply; 5+ messages in thread
From: Richard Biener @ 2016-09-27 10:32 UTC (permalink / raw)
  To: Marek Polacek; +Cc: GCC Patches

On Tue, Sep 27, 2016 at 11:40 AM, Marek Polacek <polacek@redhat.com> wrote:
> GCC 4.3 stupidly errors on this with
> error: unrecognized command line option "-Wno-implicit-fallthrough"
> so use -Wno-error instead.
>
> Bootstrapped on x86_64-linux, ok for trunk?

Ok for trunk now to unbreak peoples bootstrap.  We can improve on this
later if we want.

Richard.

> 2016-09-27  Marek Polacek  <polacek@redhat.com>
>
>         PR bootstrap/77751
>         * Makefile.in (insn-attrtab.o-warn, insn-dfatab.o-warn,
>         insn-latencytab.o-warn, insn-output.o-warn, insn-emit.o-warn): Use
>         -Wno-error instead of -Wno-implicit-fallthrough.
>
> diff --git gcc/Makefile.in gcc/Makefile.in
> index e8559cb..ff12908 100644
> --- gcc/Makefile.in
> +++ gcc/Makefile.in
> @@ -218,11 +218,11 @@ libgcov-merge-tool.o-warn = -Wno-error
>  gimple-match.o-warn = -Wno-unused
>  generic-match.o-warn = -Wno-unused
>  dfp.o-warn = -Wno-strict-aliasing
> -insn-attrtab.o-warn = -Wno-implicit-fallthrough
> -insn-dfatab.o-warn = -Wno-implicit-fallthrough
> -insn-latencytab.o-warn = -Wno-implicit-fallthrough
> -insn-output.o-warn = -Wno-implicit-fallthrough
> -insn-emit.o-warn = -Wno-implicit-fallthrough
> +insn-attrtab.o-warn = -Wno-error
> +insn-dfatab.o-warn = -Wno-error
> +insn-latencytab.o-warn = -Wno-error
> +insn-output.o-warn = -Wno-error
> +insn-emit.o-warn = -Wno-error
>
>  # All warnings have to be shut off in stage1 if the compiler used then
>  # isn't gcc; configure determines that.  WARN_CFLAGS will be either
>
>         Marek

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Unbreak bootstrap with GCC 4.3 (PR bootstrap/77751)
  2016-09-27 10:32 ` Richard Biener
@ 2016-09-27 10:48   ` Marek Polacek
  0 siblings, 0 replies; 5+ messages in thread
From: Marek Polacek @ 2016-09-27 10:48 UTC (permalink / raw)
  To: Richard Biener; +Cc: GCC Patches

On Tue, Sep 27, 2016 at 12:24:23PM +0200, Richard Biener wrote:
> On Tue, Sep 27, 2016 at 11:40 AM, Marek Polacek <polacek@redhat.com> wrote:
> > GCC 4.3 stupidly errors on this with
> > error: unrecognized command line option "-Wno-implicit-fallthrough"
> > so use -Wno-error instead.
> >
> > Bootstrapped on x86_64-linux, ok for trunk?
> 
> Ok for trunk now to unbreak peoples bootstrap.  We can improve on this
> later if we want.

Committed.  I'll look into the configure test check now.

	Marek

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-09-27 10:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-27  9:44 Unbreak bootstrap with GCC 4.3 (PR bootstrap/77751) Marek Polacek
2016-09-27 10:01 ` Jakub Jelinek
2016-09-27 10:22   ` Andreas Schwab
2016-09-27 10:32 ` Richard Biener
2016-09-27 10:48   ` Marek Polacek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).