Bug 1597104
| Summary: | G++ 7.3.1 does not compile c++ code | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Developer Toolset | Reporter: | Ankur deDev <ankur.dedev> | ||||
| Component: | gcc | Assignee: | Marek Polacek <mpolacek> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Michael Petlan <mpetlan> | ||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | DTS 7.1 RHEL 7 | CC: | jakub, jason, kanderso, law, mcermak, mnewsome, mpetlan, ohudlick | ||||
| Target Milestone: | alpha | ||||||
| Target Release: | 8.0 | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | devtoolset-8-gcc-8.1.1-5.el7 | Doc Type: | Bug Fix | ||||
| Doc Text: |
Previously, G++ could reject valid code using a functional cast in template noexcept-specifier. The bug has been fixed and the code can now be compiled.
|
Story Points: | --- | ||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2018-11-13 08:38:37 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
Reproduced with trunk; I'll take this upstream. Fixed upstream. VERIFIED for devtoolset-8-gcc-8.2.1-3. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2018:3562 |
Created attachment 1455858 [details] Test case to reproduce issue Description of problem: C++ code does not compile. Version-Release number of selected component (if applicable): g++ (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5). Steps to Reproduce: 1. Download test.cpp attachment 2. Run command: scl enable devtoolset-7 'bash' 3. Compile the attachment: g++ test.cpp Actual results: test.cpp: In instantiation of ‘constexpr Combination<FRUIT, SPICE>::Combination(SPICE&&, ARGS&& ...) [with ARGS = {Pepper}; FRUIT = Apple; SPICE = Pepper]’: test.cpp:35:13: required from ‘constexpr MyCombination::MyCombination(ARGS&& ...) [with ARGS = {Apple}]’ test.cpp:47:29: required from here test.cpp:18:29: error: no matching function for call to ‘Apple::Apple(Pepper)’ , SPICE(std::move(spice)) ... Expected results: Should compile without errors or warnings as is the case with g++ (GCC) 4.8.5 20150623 (Red Hat 4.8.5-28): g++ -std=c++11 test.cpp