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++/54891] New: [C++11] lambda-expression and explicit type conversion (cast notation)


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54891

             Bug #: 54891
           Summary: [C++11] lambda-expression and explicit type conversion
                    (cast notation)
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: ai.azuma@gmail.com


Created attachment 28413
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28413
Output of -v option and preprocessed file

The following valid code is rejected by GCC 4.8.0 20121007, 4.7.3 20121006 and
4.6.4 20121005.

/////////////
int main()
{
  (void)[]{};
}
/////////////

For the above code, GCC 4.8.0 20121007 says;

main.cpp: In function 'int main()':
main.cpp:3:4: error: expected primary-expression before 'void'
   (void)[]{};
    ^
main.cpp:3:4: error: expected ')' before 'void'


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