]> gcc.gnu.org Git - gcc.git/commit
Implement C++0x 'auto' semantics.
authorJason Merrill <jason@redhat.com>
Sat, 30 Aug 2008 05:14:54 +0000 (01:14 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Sat, 30 Aug 2008 05:14:54 +0000 (01:14 -0400)
commit86a09a9e99fd73423b6b00b1083abfb0d8ac862d
treee0bd80b1274106f983a05d33d9c48ec65a2d8085
parentb3914aa38f56986ba8ff512ded75608e875436e2
Implement C++0x 'auto' semantics.

        * decl.c (start_decl_1): Don't complain about auto being incomplete.
        (cp_finish_decl): Deduce auto.
        * init.c (build_new): Handle 'new auto'.
        * typeck2.c (cxx_incomplete_type_diagnostic): Give a different
        message for auto than for normal template type parms.
        * pt.c (type_dependent_expression_p): Handle { }.
        (make_auto): New function.
        (listify_autos): New function.
        (do_auto_deduction): New function.
        (is_auto): New function.
        (type_uses_auto): New function.
        * cp-tree.h: Declare them.
        * parser.c (cp_parser_decl_specifier_seq): In C++0x mode, don't
        treat auto as a declspec.
        (cp_parser_simple_type_specifier): It's a type-specifier.

From-SVN: r139798
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/decl.c
gcc/cp/init.c
gcc/cp/parser.c
gcc/cp/pt.c
gcc/cp/typeck2.c
gcc/testsuite/g++.dg/cpp0x/auto2.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/auto3.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/auto4.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/auto5.C [new file with mode: 0644]
This page took 0.065804 seconds and 5 git commands to generate.