Bug 77751 - [7 regression] cc1plus: error: unrecognized command line option "-Wno-implicit-fallthrough" for insn-emit.o
Summary: [7 regression] cc1plus: error: unrecognized command line option "-Wno-implici...
Status: VERIFIED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: bootstrap (show other bugs)
Version: 7.0
: P3 normal
Target Milestone: 7.0
Assignee: Marek Polacek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-27 07:46 UTC by Gerald Pfeifer
Modified: 2016-09-27 14:14 UTC (History)
1 user (show)

See Also:
Host: i?86-unknown-freebsd9
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2016-09-27 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gerald Pfeifer 2016-09-27 07:46:26 UTC
On i?86-unknown-freebsd9, which has GCC 4.2 as system compiler, bootstrap
started to fail as follows:

emit.TPo insn-emit.c
g++ -std=gnu++98 -fno-PIE -c   -g -DIN_GCC    -fno-strict-aliasing -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wwrite-strings -Wcast-qual -Wno-format -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H -I. -I. -I/scratch/tmp/gerald/gcc-HEAD/gcc -I/scratch/tmp/gerald/gcc-HEAD/gcc/. -I/scratch/tmp/gerald/gcc-HEAD/gcc/../include -I./../intl -I/scratch/tmp/gerald/gcc-HEAD/gcc/../libcpp/include -I/home/gerald/9-amd64/include  -I/scratch/tmp/gerald/gcc-HEAD/gcc/../libdecnumber -I/scratch/tmp/gerald/gcc-HEAD/gcc/../libdecnumber/dpd -I../libdecnumber -I/scratch/tmp/gerald/gcc-HEAD/gcc/../libbacktrace   -o insn-extract.o -MT insn-extract.o -MMD -MP -MF ./.deps/insn-extract.TPo insn-extract.c
cc1plus: error: unrecognized command line option "-Wno-implicit-fallthrough"
gmake[3]: *** [Makefile:1102: insn-emit.o] Error 1
gmake[3]: *** Waiting for unfinished jobs....
rm fsf-funding.pod gcov.pod gpl.pod cpp.pod gfdl.pod gcc.pod gcov-tool.pod
gmake[3]: Leaving directory '/scratch/tmp/gerald/OBJ-0927-0731/gcc'
gmake[2]: *** [Makefile:4571: all-stage1-gcc] Error 2
gmake[2]: Leaving directory '/scratch/tmp/gerald/OBJ-0927-0731'
gmake[1]: *** [Makefile:24240: stage1-bubble] Error 2
gmake[1]: Leaving directory '/scratch/tmp/gerald/OBJ-0927-0731'
gmake: *** [Makefile:24577: bootstrap] Error 2

I believe this is caused by

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

        PR c/7652
        * Makefile.in (insn-attrtab.o-warn, insn-dfatab.o-warn,
        insn-latencytab.o-warn, insn-output.o-warn, insn-emit.o-warn): Add
        -Wno-switch-fallthrough.
Comment 1 Andrew Pinski 2016-09-27 07:52:50 UTC
Oh yes older gcc complain about non-existent negative warning options.
Comment 2 Richard Biener 2016-09-27 07:59:54 UTC
Confirmed.  You can't do this for flags not present in all GG supported for stage1.  See how -Wno-error is used instead of a specific warning on other
objects for the very same reason.
Comment 3 Marek Polacek 2016-09-27 10:41:09 UTC
Author: mpolacek
Date: Tue Sep 27 10:40:37 2016
New Revision: 240526

URL: https://gcc.gnu.org/viewcvs?rev=240526&root=gcc&view=rev
Log:
	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.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/Makefile.in
Comment 4 Marek Polacek 2016-09-27 12:58:46 UTC
Should be fixed.
Comment 5 Gerald Pfeifer 2016-09-27 14:14:40 UTC
(In reply to Marek Polacek from comment #4)
> Should be fixed.

Yep, verified.