OSDN Git Service

Add support for C++0x nullptr.
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 6 May 2010 20:51:52 +0000 (20:51 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 6 May 2010 20:51:52 +0000 (20:51 +0000)
commit6fe110773dc4e0ff861a8e05ab53ead156686b35
tree6b6815281c65b569db623d6f41bf2f7830a753db
parent4681b76f40cb3a71016071aaf75bd7c74d98321f
Add support for C++0x nullptr.
gcc:
* c-common.c (c_common_reswords): Add nullptr.
* c-common.h: Add RID_NULLPTR.  Reorganize C++0x rids.
* dwarf2out.c (is_base_type): Handle NULLPTR_TYPE.
(gen_type_die_with_usage): Likewise.
* dbxout.c (dbxout_type): Likewise.
* sdbout.c (plain_type_1): Likewise.
gcc/cp:
* cp-tree.def: Add NULLPTR_TYPE.
* cp-tree.h: Add nullptr_node.
(cp_tree_index): Add CPTI_NULLPTR.
(SCALAR_TYPE_P): Add NULLPTR_TYPE.
* call.c (null_ptr_cst_p): Handle nullptr.
(standard_conversion): Likewise.
(convert_arg_to_ellipsis): Likewise.
* mangle.c (write_type): Likewise.
* name-lookup.c (arg_assoc_type): Likewise.
* parser.c (cp_parser_primary_expression): Likewise.
* typeck.c (cp_build_binary_op): Likewise.
(build_reinterpret_cast_1): Likewise.
* error.c (dump_type): Likewise.
(dump_type_prefix, dump_type_suffix): Likewise.
* decl.c (cxx_init_decl_processing): Likewise.
* cxx-pretty-print.c (pp_cxx_constant): Likewise.
* cvt.c (ocp_convert): Likewise.
* rtti.c (typeinfo_in_lib_p, emit_support_tinfos): Put
nullptr_t tinfo in libsupc++.
libstdc++-v3:
* config/abi/pre/gnu.ver: Add typeinfo for decltype(nullptr).
libiberty:
* cp-demangle.c (cplus_demangle_builtin_types): Add nullptr.
(cplus_demangle_type): Handle nullptr.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159131 138bc75d-0d04-0410-961f-82ee72b054a4
52 files changed:
gcc/ChangeLog
gcc/c-common.c
gcc/c-common.h
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/cp/cp-tree.def
gcc/cp/cp-tree.h
gcc/cp/cvt.c
gcc/cp/cxx-pretty-print.c
gcc/cp/decl.c
gcc/cp/error.c
gcc/cp/mangle.c
gcc/cp/name-lookup.c
gcc/cp/parser.c
gcc/cp/rtti.c
gcc/cp/typeck.c
gcc/dbxout.c
gcc/dwarf2out.c
gcc/fortran/trans-expr.c
gcc/sdbout.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/nullptr01.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/nullptr02.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/nullptr03.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/nullptr04.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/nullptr05.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/nullptr06.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/nullptr07.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/nullptr08.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/nullptr09.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/nullptr10.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/nullptr11.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/nullptr12.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/nullptr13.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/nullptr14.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/nullptr15.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/nullptr16.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/nullptr17.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/nullptr18.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/nullptr19.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/nullptr20.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/nullptr21.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/nullptr22.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/warn_cxx0x.C
gcc/testsuite/g++.dg/debug/nullptr01.C [new file with mode: 0644]
gcc/testsuite/gcc.dg/Wcxx-compat-2.c
libiberty/ChangeLog
libiberty/cp-demangle.c
libiberty/cp-demangle.h
libiberty/testsuite/demangle-expected
libstdc++-v3/ChangeLog
libstdc++-v3/config/abi/pre/gnu.ver