This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/50169] "new struct X {{}};" incorrectly treated as an invalid struct-definition
- From: "ville.voutilainen at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 23 Aug 2011 21:22:39 +0000
- Subject: [Bug c++/50169] "new struct X {{}};" incorrectly treated as an invalid struct-definition
- Auto-submitted: auto-generated
- References: <bug-50169-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50169
Ville Voutilainen <ville.voutilainen at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ville.voutilainen at gmail
| |dot com
--- Comment #1 from Ville Voutilainen <ville.voutilainen at gmail dot com> 2011-08-23 21:22:39 UTC ---
Trying
struct A { int a; };
int main() {
new (struct A) {{ }};
}
gives
internal compiler error: in cxx_eval_bare_aggregate, at cp/semantics.c:6601
This works fine:
struct A { int a; };
int main() {
new (struct A) { };
}