]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/testsuite/ChangeLog
Implement LWG2296 helper intrinsic
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 7 Oct 2016 19:37:46 +0000 (19:37 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 7 Oct 2016 19:37:46 +0000 (19:37 +0000)
commitcd45162da9ab14881afeb0b4a4625e21c7459f5f
tree7b14e19adcc90c0ed591c2745b010b6ffcf52ade
parent7d29bba92ccb6f92f738011e9e2e670dd84126db
Implement LWG2296 helper intrinsic
c-family/
* c-common.h (enum rid): Add RID_ADDRESSOF.
* c-common.c (c_common_reswords): Add __builtin_addressof.
cp/
* parser.c (cp_parser_postfix_expression): Handle RID_ADDRESSOF.
* cp-objcp-common.c (cp_common_init_ts): Handle ADDRESSOF_EXPR.
* constexpr.c (potential_constant_expression_1): Likewise.
* error.c (dump_expr): Likewise.
* typeck.c (cp_build_addressof): New function.
* cp-tree.h (cp_build_addressof): Declare.
* cxx-pretty-print.h (pp_cxx_addressof_expression): Declare.
* cp-tree.def (ADDRESSOF_EXPR): New tree code.
* cxx-pretty-print.c (cxx_pretty_printer::primary_expression): Handle
ADDRESSOF_EXPR.  Add __builtin_addressof and
__has_unique_object_representations into syntax in function comment.
(pp_cxx_addressof_expression): New function.
* pt.c (tsubst_copy_and_build): Handle ADDRESSOF_EXPR.
testsuite/
* g++.dg/cpp0x/addressof1.C: New test.
* g++.dg/cpp0x/addressof2.C: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@240873 138bc75d-0d04-0410-961f-82ee72b054a4
17 files changed:
gcc/c-family/ChangeLog
gcc/c-family/c-common.c
gcc/c-family/c-common.h
gcc/cp/ChangeLog
gcc/cp/constexpr.c
gcc/cp/cp-objcp-common.c
gcc/cp/cp-tree.def
gcc/cp/cp-tree.h
gcc/cp/cxx-pretty-print.c
gcc/cp/cxx-pretty-print.h
gcc/cp/error.c
gcc/cp/parser.c
gcc/cp/pt.c
gcc/cp/typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/addressof1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/addressof2.C [new file with mode: 0644]