This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/25814] Request for warning for parser ambiguity of function declarations and variable declarations with initializations


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25814

Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2006-03-08 05:07:27         |2016-8-12
                 CC|                            |manu at gcc dot gnu.org

--- Comment #7 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
Clang gives:

prog.cc:19:6: warning: parentheses were disambiguated as a function declaration
[-Wvexing-parse]
  X x(Y());
     ^~~~~
prog.cc:19:7: note: add a pair of parentheses to declare a variable
  X x(Y());
      ^
      (  )
1 warning generated.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]