Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 548412 (PR65801) - [5.1] sys-devel/gcc: Allow -Wno-narrowing to silence stricter C++11 narrowing rules
Summary: [5.1] sys-devel/gcc: Allow -Wno-narrowing to silence stricter C++11 narrowing...
Status: RESOLVED FIXED
Alias: PR65801
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL: https://gcc.gnu.org/PR65801
Whiteboard:
Keywords:
Depends on:
Blocks: 548306
  Show dependency tree
 
Reported: 2015-05-02 17:23 UTC by Helmut Jarausch
Modified: 2015-07-17 07:37 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patched ebuild (chromium-44.0.2383.0.ebuild,19.92 KB, text/plain)
2015-05-02 17:23 UTC, Helmut Jarausch
Details
gcc patch (gcc-5.1.0-narrowing.patch,691 bytes, patch)
2015-05-02 17:24 UTC, Helmut Jarausch
Details | Diff
corrected ebuild for gcc (gcc-5.1.0.ebuild,1.37 KB, text/plain)
2015-05-02 17:26 UTC, Helmut Jarausch
Details
patch for gcc-5.1.0 (gcc-5.1.0-narrowing.patch,806 bytes, patch)
2015-05-07 16:26 UTC, Helmut Jarausch
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Helmut Jarausch 2015-05-02 17:23:27 UTC
Created attachment 402440 [details]
patched ebuild

The patch from upstream https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65801
should be applied to gcc-5.1.0, as well.
(This break chromium)

The patch is attached.
Comment 1 Helmut Jarausch 2015-05-02 17:24:41 UTC
Created attachment 402442 [details, diff]
gcc patch
Comment 2 Helmut Jarausch 2015-05-02 17:26:27 UTC
Created attachment 402444 [details]
corrected ebuild for gcc
Comment 3 Ryan Hill (RETIRED) gentoo-dev 2015-05-02 23:08:09 UTC
It's upstream so I guess we can add it, but these errors should really be fixed in the package that causes them, not worked around with a compiler flag.
Comment 4 Helmut Jarausch 2015-05-07 16:26:00 UTC
Created attachment 402834 [details, diff]
patch for gcc-5.1.0

This patch is the most recent (accepted) version from upstream (backported to 5.1.0)
Comment 5 Tolga Dalman 2015-06-14 01:12:33 UTC
(In reply to Ryan Hill from comment #3)
> It's upstream so I guess we can add it, but these errors should really be
> fixed in the package that causes them, not worked around with a compiler
> flag.

I'm not sure I understand correctly. This is clearly a GCC problem, not a package issue. Please add this patch, otherwise Chromium will not build (see bug 548306).
Comment 6 Ryan Hill (RETIRED) gentoo-dev 2015-06-14 07:11:15 UTC
It's a package bug.  The code violates the C++-11 standard and should be fixed.  Allowing -Wno-narrowing to suppress the error is papering over the problem.
Comment 7 Tolga Dalman 2015-06-14 08:44:08 UTC
(In reply to Ryan Hill from comment #6)
> It's a package bug.  The code violates the C++-11 standard and should be
> fixed.  Allowing -Wno-narrowing to suppress the error is papering over the
> problem.

Thanks for your comment and adding the reference.

While the code in Chromium might be suboptimal, the real bug is that GCC ignores -Wno-narrowing. I think Chromium  used -std=c++11 before as well, but now regresses with GCC 5.1. In fact, I wonder why an error instead of a warning is emitted.

The question is how to continue in Gentoo. Either we wait for a new GCC version (which might take some time), or make a gcc-5.1.0-r1 containing this bugfix.
Comment 8 Ryan Hill (RETIRED) gentoo-dev 2015-06-19 23:58:02 UTC
There's no question.  This will get added when we do a new patchset.  I'll see if I can do it this weekend.
Comment 9 SpanKY gentoo-dev 2015-07-17 07:37:27 UTC
this is fixed w/gcc-5.2 which is in the tree now