This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/77750] [7 Regression] gcc build not working with -O0
- From: "louis.krupp at zoho dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 09 Nov 2016 19:37:08 +0000
- Subject: [Bug c/77750] [7 Regression] gcc build not working with -O0
- Auto-submitted: auto-generated
- References: <bug-77750-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77750
--- Comment #8 from louis.krupp at zoho dot com ---
The patch is no longer necessary, because it looks like the problem with
combine.c was fixed on 1 November:
===
r241744 | foreese | 2016-11-01 09:29:51 -0600 (Tue, 01 Nov 2016) | 5 lines
Mark fallthrough cases with gcc_fallthrough.
* gcc/combine.c (simplify_compare_const): Add gcc_fallthrough.
===
and my guess is that the problem with the fall-through comment format in
fold-const.c went away back in October when you fixed lex.c:
===
r241013 | jakub | 2016-10-11 17:19:06 -0600 (Tue, 11 Oct 2016) | 31 lines
gcc/
* common.opt (Wimplicit-fallthrough) Turn into alias to
-Wimplicit-fallthrough=3. Remove EnabledBy.
(Wimplicit-fallthrough=): New option.
* gimplify.c (warn_implicit_fallthrough_r): Use
OPT_Wimplicit_fallthrough_ instead of OPT_Wimplicit_fallthrough.
* doc/invoke.texi (-Wimplicit-fallthrough): Document as alias
to -Wimplicit-fallthrough=3.
(-Wimplicit-fallthrough=): Document.
gcc/c-family/
* c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
(Wimplicit-fallthrough=): Enable for these languages by -Wextra.
* c-opts.c (sanitize_cpp_opts): Initialize
cpp_opts->cpp_warn_implicit_fallthrough.
gcc/testsuite/
* c-c++-common/Wimplicit-fallthrough-25.c: New test.
* c-c++-common/Wimplicit-fallthrough-26.c: New test.
* c-c++-common/Wimplicit-fallthrough-27.c: New test.
* c-c++-common/Wimplicit-fallthrough-28.c: New test.
* c-c++-common/Wimplicit-fallthrough-29.c: New test.
* c-c++-common/Wimplicit-fallthrough-30.c: New test.
* c-c++-common/Wimplicit-fallthrough-31.c: New test.
* c-c++-common/Wimplicit-fallthrough-32.c: New test.
* c-c++-common/Wimplicit-fallthrough-33.c: New test.
libcpp/
* include/cpplib.h (struct cpp_options): Add
cpp_warn_implicit_fallthrough.
* init.c (cpp_create_reader): Initialize it to 0.
* lex.c (fallthrough_comment_p): Handle different
cpp_warn_implicit_fallthrough levels. Whitespace fixes.
===
Thank you for doing that.
Would you like to close pr77750, since you fixed part of it, or shall I?
Louis
---- On Wed, 09 Nov 2016 06:44:59 -0800 jakub at gcc dot gnu.org
<gcc-bugzilla@gcc.gnu.org> wrote ----
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77750
>
> Jakub Jelinek <jakub at gcc dot gnu.org> changed:
>
> What |Removed |Added
> ----------------------------------------------------------------------------
> CC| |jakub at gcc dot gnu.org
>
> --- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
> I don't see why the #c6 patch should be necessary, nor can reproduce this.
> Are you using some older trunk version as bootstrap compiler, or something
> similar?
> E.g. the first case is:
> case LT:
> /* < C is equivalent to <= (C - 1) */
> if (const_op > 0)
> {
> const_op -= 1;
> code = LE;
> /* ... fall through to LE case below. */
> gcc_fallthrough ();
> }
> else
> break;
>
> case LE:
> and there really is no need for any fallthrough comment, gcc_fallthrough ();
> already represents that and works even at -O0.
>
> --
> You are receiving this mail because:
> You reported the bug.