http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52960
Bug #: 52960 Summary: Missing warnings on ambiguous source : function decl vs local var decl Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: xinlian...@gmail.com struct S { int n; }; S bar(); S test() { S foo, bar(); // ... return foo; } /* conversions.cppreturn.cpvexing.cpp vexing.cpp:5:6: warning: empty parentheses interpreted as a function declaration [-Wvexing-parse] bar(); ^~ vexing.cpp:4:8: note: change this ',' to a ';' to call 'bar' S foo, ^ ; vexing.cpp:5:6: note: replace parentheses with an initializer to declare a variable bar(); ^~ {} 1 warning generated. */