Re: gcc interprets C++0x initialization construct as function declaration

2011-01-04 Thread Jonathan Wakely
On 3 January 2011 05:24, Nathan Ridge wrote: > > Is this the desired behaviour? Questions about whether code is valid or whether gcc has a bug should be sent to the gcc-h...@gcc.gnu.org mailing list or entered into bugzilla, thanks.

gcc interprets C++0x initialization construct as function declaration

2011-01-02 Thread Nathan Ridge
Hello, For the following code: struct S { int a; float b; }; struct T { T(S s) {} }; int main() { T t(S{1, 0.1}); // ERROR HERE } gcc 4.6 trunk gives the following errors (with the --std=c++0x option): decl.cpp: In function 'int main()': decl.cpp:14:10: error: expected ')' befo