public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/51911] New: [C++11] G++ accepts new auto { list }
@ 2012-01-20  7:41 jason at gcc dot gnu.org
  2015-06-24 19:11 ` [Bug c++/51911] " paolo.carlini at oracle dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: jason at gcc dot gnu.org @ 2012-01-20  7:41 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 51911
           Summary: [C++11] G++ accepts new auto { list }
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Keywords: accepts-invalid
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: jason@gcc.gnu.org


If the auto type-specifier appears in the type-specifier-seq of a new-type-id
or type-id of a new-expression, the new-expression shall contain a
new-initializer of the form ( assignment-expression )

So this shouldn't compile:

#include <initializer_list>
int main()
{
    auto foo = new auto {3, 4, 5};
}


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

end of thread, other threads:[~2015-09-14 15:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-20  7:41 [Bug c++/51911] New: [C++11] G++ accepts new auto { list } jason at gcc dot gnu.org
2015-06-24 19:11 ` [Bug c++/51911] " paolo.carlini at oracle dot com
2015-09-14 15:25 ` paolo at gcc dot gnu.org
2015-09-14 15:26 ` paolo.carlini at oracle 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).