This is the mail archive of the 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]

[patch]: New feature __int128 type C/C++ for upcoming 4.6 for review


this patch adds support of keyword "__int128" for 128-bit integer scalar type.

ChangeLog gcc/doc

2010-01-09  Kai Tietz  <>

	* doc/c-tree.texi (INTEGER_TYPE): Add documentation
	of __int128 type.
	* doc/extend.texi: Likewise.
	* tm.texi (INT128_TYPE_SIZE): Add documentation.

ChangeLog gcc

2010-01-09  Kai Tietz  <>

	* builtin-types.def (BT_INT128): New primitive type.
	(BT_UINT128): Likewise.
	* c-common.h (enum rid): New enumerator RID_INT128.
	* c-cppbuiltins.c (c_cpp_builtins): Define if supported
	by target __SIZEOF_INT128__.
	(type_suffix): Add "I128" and "UI128" suffix for display.
	* c-pretty-print.c: Likewise.
	* c-common.c (int128_integer_type_node): Add
	documentation reference.
	(int128_unsigned_type_node): Likewise.
	(c_common_reswords): Add "__int128" keyword.
	(c_common_type_for_size): Add support for
	int128_integer_type_node and int128_unsigned_type_node.
	(c_common_type_for_mode): Likewise.
	(c_common_signed_or_unsigned_type): Likewise.
	(c_build_bitfield_integer_type): Likewise.
	(c_common_nodes_and_builtins): Likewise.
	* c-decl.c (quals_from_declspecs): Likewise.
	(build_null_declspecs): Likewise.
	(declspecs_add_type): Likewise.
	* gimple.c (gimple_signed_or_unsigned_type): Likewise.
	* tree.c (make_or_reuse_type): Likewise.
	(build_common_tree_nodes): Likewise.
	* c-parser.c (c_token_starts_typename): Add RID_INT128 support.
	(c_token_starts_declspecs): Likewise.
	(c_parser_declspecs): Likewise.
	(c_parser_attributes): Likewise.
	(c_parser_objc_selector): Likewise.
	* c-tree.h (struct c_declspecs): Add int128_p bitfield member.
	* defaults.h (INT128_TYPE_SIZE): New macro for type size.
	* tree.h (enum integer_type_kind): Add itk_int128 and
	itk_unsigned_int128 enumerator.
	(int128_integer_type_node): New.
	(int128_unsigned_type_node=: New.

ChangeLog gcc/cp

2010-01-09  Kai Tietz  <>

	* cp/cp-tree.h (cp_decl_specifier_seq): Add explicit_int128_p
	bitfield member.
	* cp/decl.c (grokdeclarator): Add __int128 type support.
	* cp/parser.c (cp_lexer_next_token_is_decl_specifier_keyword):
	Add RID_INT128 check.
	(cp_parser_simple_type_specifier): Likewise.
	* cp/rtti.c (emit_support_tinfos): Likewise.
	* cp/typeck.c (cp_common_type): Likewise.

ChangeLog gcc/testsuite

2010-01-09  Kai Tietz  <>

	* gcc.dg/int128-1.c: New test case.
	* gcc.dg/int128-2.c: Likewise.
	* gcc.dg/int128-3.c: Likewise.

This patch was tested for i686-pc-cygwin, x86_64-w64-mingw32,
i686-w64-mingw32, and i686-pc-linux.

Is this patch to apply to 4.6 as soon as 4.6 will be in stage 1?


|  (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination

Attachment: int128.diff
Description: Binary data

Attachment: int128doc.diff
Description: Binary data

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