Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

media-gfx/exact-image: Fix building with GCC-6 #5275

Closed
wants to merge 1 commit into from

Conversation

Peter-Levine
Copy link
Contributor

Bug: https://bugs.gentoo.org/show_bug.cgi?id=600380
Package-Manager: Portage-2.3.6, Repoman-2.3.2

This fixes GCC-6 porting issues related to narrowing conversions in brace initialization and invalid implicit conversion from stream object to `bool.

There was also the problem of static const in-class initialization of non-integral types. This is relaxed for floating-point types with GCC using C++98 but not C++11/14. The dialect-neutral way of handling this is to declare such variables as static const in-class in the header but define and initialize them as const in a relevant source file. All attempts as such failed with ODR violations at link-time. Resorting to constexpr with conditional dialect-dependent #defines sufficed.

Upstream doesn't provide any official means of commit or patch submission. Furthermore, having tested later versions, the GCC-6/GCC-5 related bugs become more egregious (eg., use of gotos leading to errors of the type error: jump to label 'foo' from here crosses initialization of 'bar x').

@gentoo-repo-qa-bot gentoo-repo-qa-bot added the assigned PR successfully assigned to the package maintainer(s). label Aug 2, 2017
@gentoo-repo-qa-bot
Copy link
Collaborator

Pull Request assignment

Areas affected: ebuilds
Packages affected: media-gfx/exact-image

media-gfx/exact-image: @gentoo/graphics

Copy link
Member

@SoapGentoo SoapGentoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Peter-Levine We should always strive for -std= agnostic fixes. If though you run into ODR-related issues at link-time, for the future, just jump to C++11 directly (i.e. append-cxxflags -std=c++11) and be done with it. There's a certain threshold for making things standard agnostic for me, and macro dispatching to avoid ODR failures is imo too much for me. I'll approve but leave it open, if you wish to go pure C++11 instead.

@gentoo-bot gentoo-bot closed this in 97e7a2a Sep 2, 2017
@Peter-Levine Peter-Levine deleted the bug-600380 branch September 2, 2017 22:15
strahlc pushed a commit to strahlc/gentoo that referenced this pull request Sep 6, 2017
Closes: https://bugs.gentoo.org/600380
Closes: gentoo#5275
Package-Manager: Portage-2.3.6, Repoman-2.3.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assigned PR successfully assigned to the package maintainer(s).
Projects
None yet
3 participants