aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-parser.c
diff options
context:
space:
mode:
authorKai Tietz <kai.tietz@onevision.com>2010-05-26 16:13:55 +0000
committerKai Tietz <ktietz@gcc.gnu.org>2010-05-26 18:13:55 +0200
commita6766312d3001a708ed8ad1bd02ccbf95bd2c671 (patch)
treea8a266122bedc642da5d3e6dbb95526bcdf6c29d /gcc/c-parser.c
parent880ad25fc7968f5f3d1e9042b2c07812e01a2c99 (diff)
downloadgcc-a6766312d3001a708ed8ad1bd02ccbf95bd2c671.zip
gcc-a6766312d3001a708ed8ad1bd02ccbf95bd2c671.tar.gz
gcc-a6766312d3001a708ed8ad1bd02ccbf95bd2c671.tar.bz2
demangle-expected: Add tests for __int128 and unsigned __int128 types.
libiberty/ 2010-05-26 Kai Tietz <kai.tietz@onevision.com> * testsuite/demangle-expected: Add tests for __int128 and unsigned __int128 types. gcc/testsuite 2010-05-26 Kai Tietz <kai.tietz@onevision.com> * lib/target-supports.exp (check_effective_target_int128): New function to check if __int128 types are available for target. * testsuite/c-c++-common/int128-types-1.c: New. * testsuite/c-c++-common/int128-1.c: New. * testsuite/c-c++-common/int128-2.c: New. * g++.dg/abi/mangle43.C: New. * g++.dg/init/enum1.C: Handle __int128 case and add -Wno-overflow. * g++.dg/cpp0x/nullptr04.C: Use __SIZE_TYPE__ for getting pointer-wide scalar. * g++.dg/other/pr25632.C: Likewise. * g++.dg/other/large-size-array.C (DIM): Use ULLONG_MAX for win64 case. * g++.dg/warn/pr13358-2.C: Add llp64 for check of special overflow warnings. * g++.dg/warn/pr13358-4.C: Likewise. * g++.dg/warn/Wconversion-null-2.C: Add 'long long' case. * g++.dg/warn/Wconversion-null.C: Likewise. gcc/ 2010-05-26 Kai Tietz <kai.tietz@onevision.com> * builtin-types.def (BT_INT128): New primitive type. (BT_UINT128): Likewise. * c-common.c (c_common_r): Add __int128 keyword. (c_common_type_for_size): Handle __int128. (c_common_type_for_mode): Likewise. (c_common_signed_or_unsigned_type): Likewise. (c_common_nodes_and_builtins): Add builtin type if target supports 128-bit integer scalar. * c-common.h (enum rid): Add RID_INT128. * c-cppbuiltin.c (c_cpp_builtins): Define __SIZEOF_INT128__ if target supports 128-bit integer scalar. * c-decl.c (declspecs_add_type): Handle new keyword __int128. (finish_declspecs): Likewise. * c-parser.c (c_token_starts_typename): Handle RID_INT128. (c_token_starts_declspecs): Likewise. (c_parser_declspecs): Likewise. (c_parser_attributes): Likewise. (c_parser_objc_selector): Likewise. * c-pretty-print.c (pp_c_integer_constant): Handle __int128. * c-tree.h (enum c_typespec_keyword): Add cts_int128. * gimple.c (gimple_signed_or_unsigned_type): Handle int128 types. * tree.c (make_or_reuse_type): Likewise. (make_unsigned_type): Likewise. (build_common_tree_nodes_2): Likewise. * tree.h (enum integer_type_kind): Add itk_int128 and itk_unsigned_int128. (int128_integer_type_node): New define.. (int128_unsigned_type_node): New define. * cp/cp-tree.h (cp_decl_specifier_seq): Add new bifield explicit_int128_p. * cp/decl.c (grokdeclarator): Handle __int128. * cp/parser.c (cp_lexer_next_token_is_decl_specifier_ke): Likewise. (cp_parser_simple_type_specifier): Likewise. * cp/rtti.c (emit_support_tinfos): Add int128 nodes for rtti. * cp/typeck.c (cp_common_type): Handle __int128. * cp/mangle.c (integer_type_codes): Add itk_int128 and itk_unsigned_int128. * doc/extend.texi: Add documentation about __int128 type. From-SVN: r159879
Diffstat (limited to 'gcc/c-parser.c')
-rw-r--r--gcc/c-parser.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/c-parser.c b/gcc/c-parser.c
index bd25f87..b30b063 100644
--- a/gcc/c-parser.c
+++ b/gcc/c-parser.c
@@ -378,6 +378,7 @@ c_token_starts_typename (c_token *token)
{
case RID_UNSIGNED:
case RID_LONG:
+ case RID_INT128:
case RID_SHORT:
case RID_SIGNED:
case RID_COMPLEX:
@@ -457,6 +458,7 @@ c_token_starts_declspecs (c_token *token)
case RID_THREAD:
case RID_UNSIGNED:
case RID_LONG:
+ case RID_INT128:
case RID_SHORT:
case RID_SIGNED:
case RID_COMPLEX:
@@ -1574,6 +1576,7 @@ c_parser_static_assert_declaration_no_semi (c_parser *parser)
type-specifier:
typeof-specifier
+ __int128
_Decimal32
_Decimal64
_Decimal128
@@ -1691,6 +1694,7 @@ c_parser_declspecs (c_parser *parser, struct c_declspecs *specs,
break;
case RID_UNSIGNED:
case RID_LONG:
+ case RID_INT128:
case RID_SHORT:
case RID_SIGNED:
case RID_COMPLEX:
@@ -3005,6 +3009,7 @@ c_parser_attributes (c_parser *parser)
case RID_STATIC:
case RID_UNSIGNED:
case RID_LONG:
+ case RID_INT128:
case RID_CONST:
case RID_EXTERN:
case RID_REGISTER:
@@ -6987,6 +6992,7 @@ c_parser_objc_selector (c_parser *parser)
case RID_ALIGNOF:
case RID_UNSIGNED:
case RID_LONG:
+ case RID_INT128:
case RID_CONST:
case RID_SHORT:
case RID_VOLATILE: