diff options
author | Joseph Myers <joseph@codesourcery.com> | 2013-11-13 00:38:49 +0000 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2013-11-13 00:38:49 +0000 |
commit | 38b7bc7fc6a883b7ed12f27c798496fceef28ba2 (patch) | |
tree | e843a9dc913b73d2b8924f2993e8aaeee0c8be4f /gcc/c/c-tree.h | |
parent | d6d3f03341138d3918c71ce9fc6f05b81ebe004e (diff) | |
download | gcc-38b7bc7fc6a883b7ed12f27c798496fceef28ba2.zip gcc-38b7bc7fc6a883b7ed12f27c798496fceef28ba2.tar.gz gcc-38b7bc7fc6a883b7ed12f27c798496fceef28ba2.tar.bz2 |
extend.texi (Statement Exprs, Typeof): Discuss __auto_type.
* doc/extend.texi (Statement Exprs, Typeof): Discuss __auto_type.
* ginclude/stdatomic.h (kill_dependency, atomic_store_explicit)
(atomic_load_explicit, atomic_exchange_explicit)
(atomic_compare_exchange_strong_explicit)
(atomic_compare_exchange_weak_explicit): Use __auto_type to
declare variable initialized with PTR argument.
c-family:
* c-common.h (enum rid): Add RID_AUTO_TYPE.
* c-common.c (c_common_reswords): Add __auto_type.
(keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
c:
* c-tree.h (c_typespec_keyword): Add cts_auto_type.
* c-decl.c (declspecs_add_type, finish_declspecs): Handle
__auto_type.
* c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
(c_parser_attribute_any_word, c_parser_objc_selector): Handle
RID_AUTO_TYPE.
(c_parser_declspecs): Take argument AUTO_TYPE_OK.
(c_parser_declaration_or_fndef, c_parser_struct_declaration)
(c_parser_declarator, c_parser_direct_declarator_inner)
(c_parser_parameter_declaration, c_parser_type_name): All callers
changed.
(c_parser_declaration_or_fndef): Handle declarations with type
determined from the initializer.
testsuite:
* gcc.dg/atomic/stdatomic-vm.c, gcc.dg/auto-type-1.c,
gcc.dg/auto-type-2.c: New tests.
From-SVN: r204731
Diffstat (limited to 'gcc/c/c-tree.h')
-rw-r--r-- | gcc/c/c-tree.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/c/c-tree.h b/gcc/c/c-tree.h index 502fdca..c4dfc3b 100644 --- a/gcc/c/c-tree.h +++ b/gcc/c/c-tree.h @@ -214,7 +214,8 @@ enum c_typespec_keyword { cts_dfloat64, cts_dfloat128, cts_fract, - cts_accum + cts_accum, + cts_auto_type }; /* This enum lists all the possible declarator specifiers, storage |