public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/52960] New: Missing warnings on ambiguous source : function decl vs local var decl
@ 2012-04-12 22:08 xinliangli at gmail dot com
  2013-05-16  9:37 ` [Bug c++/52960] " paolo.carlini at oracle dot com
  2015-06-07  9:11 ` jan.kratochvil at redhat dot com
  0 siblings, 2 replies; 3+ messages in thread
From: xinliangli at gmail dot com @ 2012-04-12 22:08 UTC (permalink / raw)
  To: gcc-bugs

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: unassigned@gcc.gnu.org
        ReportedBy: xinliangli@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.

*/


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-06-07  9:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-12 22:08 [Bug c++/52960] New: Missing warnings on ambiguous source : function decl vs local var decl xinliangli at gmail dot com
2013-05-16  9:37 ` [Bug c++/52960] " paolo.carlini at oracle dot com
2015-06-07  9:11 ` jan.kratochvil at redhat dot com

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).