Bug 1569374
Summary: | Regression error: constructor required before non-static data member | ||
---|---|---|---|
Product: | Red Hat Developer Toolset | Reporter: | Jiangdong Sun <sunjdong> |
Component: | gcc | Assignee: | Marek Polacek <mpolacek> |
Status: | CLOSED ERRATA | QA Contact: | Michael Petlan <mpetlan> |
Severity: | high | Docs Contact: | |
Priority: | unspecified | ||
Version: | DTS 7.0 RHEL 7 | CC: | jakub, kanderso, law, mcermak, mnewsome, mpetlan, ohudlick |
Target Milestone: | alpha | ||
Target Release: | 7.1 | ||
Hardware: | Unspecified | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | devtoolset-8-gcc-8.1.1-5.el7 | Doc Type: | No Doc Update |
Doc Text: |
undefined
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2018-11-13 08:38:30 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: |
Description
Jiangdong Sun
2018-04-19 07:37:36 UTC
Additionally, when compiling the code snippet with g++ 4.8.3, need to add the option "std=c++11" Isn't that invalid though? I mean, trunk g++ rejects the code: 70528.C:1:39: error: default member initializer for ‘J::K::First’ required before the end of its enclosing class template <class T, class U = decltype(T())> ^~~ 70528.C:7:15: note: defined here int First = 0; ^~~~ as does clang++: 70528.C:1:39: error: default member initializer for 'First' needed within definition of enclosing class 'J' outside of member functions template <class T, class U = decltype(T())> ^ 70528.C:9:3: note: in instantiation of default argument for 'I<J::K>' required here I<K> FunctionMDInfo; ^~~~ 70528.C:7:9: note: default member initializer declared here int First = 0; ^ 1 error generated. The PR has been resolved and the code is rejected (as it should be). Let's move on with this one. VERIFIED for devtoolset-8-gcc-8.2.1-3. The related tests passed. 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 |