public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "ppluzhnikov at google dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/58328] New: [C++11] bogus: error: constructor required before non-static data member for Date: Thu, 05 Sep 2013 21:13:00 -0000 [thread overview] Message-ID: <bug-58328-4@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58328 Bug ID: 58328 Summary: [C++11] bogus: error: constructor required before non-static data member for Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ppluzhnikov at google dot com Google ref: b/10634418 This appears to be very similar to PR 57770 Using g++ (GCC) 4.9.0 20130904 (experimental) cat t.cc struct A { struct B { // B() {} // Uncommenting this line makes it work. int y = 1; // Removing initializer makes it work. }; A(const B& opts = B()) {} // Removing default makes it work. }; g++ -c t.cc -std=c++11 t.cc: In constructor 'A::B::B()': t.cc:2:10: error: constructor required before non-static data member for 'A::B::y' has been parsed struct B { ^ t.cc: At global scope: t.cc:7:23: note: synthesized method 'A::B::B()' first required here A(const B& opts = B()) {} ^
next reply other threads:[~2013-09-05 21:13 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-09-05 21:13 ppluzhnikov at google dot com [this message] 2013-09-05 21:19 ` [Bug c++/58328] " paolo.carlini at oracle dot com 2013-09-05 21:26 ` ppluzhnikov at google dot com 2013-09-06 0:13 ` richard-gccbugzilla at metafoo dot co.uk 2014-09-19 9:22 ` paolo.carlini at oracle dot com 2014-09-19 9:35 ` paolo.carlini at oracle dot com
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-58328-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).