aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/cxx-pretty-print.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2009-07-16 16:36:10 -0400
committerJason Merrill <jason@gcc.gnu.org>2009-07-16 16:36:10 -0400
commitc32097d8b4fb21997c571cf6520431fa7d06090f (patch)
tree100c59a1743caa8ea59faa87406fd5f529be94f4 /gcc/cp/cxx-pretty-print.c
parentb3c5a40978985447d8ccf7d583929a4e8a78a91d (diff)
downloadgcc-c32097d8b4fb21997c571cf6520431fa7d06090f.zip
gcc-c32097d8b4fb21997c571cf6520431fa7d06090f.tar.gz
gcc-c32097d8b4fb21997c571cf6520431fa7d06090f.tar.bz2
re PR libstdc++/37907 ([c++0x] support for std::is_standard_layout)
PR libstdc++/37907 Support std::is_standard_layout and std::is_trivial traits, change POD to C++0x version (except for layout). * gcc/c-common.c (c_common_reswords): Add __is_standard_layout and __is_trivial. * gcc/c-common.h (enum rid): Add RID_IS_STD_LAYOUT and RID_IS_TRIVIAL. * gcc/cp/cp-tree.h (enum cp_trait_kind): Add CPTK_IS_STD_LAYOUT, CPTK_IS_TRIVIAL. (struct lang_type_class): Add non_std_layout. (CLASSTYPE_NON_STD_LAYOUT): New. * gcc/cp/class.c (check_bases): Set it. (check_field_decls): Likewise. (check_bases_and_members): Likewise. * gcc/cp/parser.c (cp_parser_primary_expression): Handle RID_IS_STD_LAYOUT, RID_IS_TRIVIAL. (cp_parser_trait_expr): Likewise. * gcc/cp/semantics.c (trait_expr_value): Handle CPTK_IS_STD_LAYOUT, CPTK_IS_TRIVIAL. (finish_trait_expr): Likewise. * gcc/cp/tree.c (scalarish_type_p, trivial_type_p, std_layout_type_p): New. (pod_type_p): Use them. * gcc/cp/typeck.c (build_class_member_access_expr): Check CLASSTYPE_NON_STD_LAYOUT rather than CLASSTYPE_NON_POD_P. * libstdc++-v3/include/std/type_traits: Add is_standard_layout, is_trivial. From-SVN: r149721
Diffstat (limited to 'gcc/cp/cxx-pretty-print.c')
-rw-r--r--gcc/cp/cxx-pretty-print.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/cp/cxx-pretty-print.c b/gcc/cp/cxx-pretty-print.c
index b8732896..0b13bc1 100644
--- a/gcc/cp/cxx-pretty-print.c
+++ b/gcc/cp/cxx-pretty-print.c
@@ -2296,6 +2296,12 @@ pp_cxx_trait_expression (cxx_pretty_printer *pp, tree t)
case CPTK_IS_POLYMORPHIC:
pp_cxx_ws_string (pp, "__is_polymorphic");
break;
+ case CPTK_IS_STD_LAYOUT:
+ pp_cxx_ws_string (pp, "__is_std_layout");
+ break;
+ case CPTK_IS_TRIVIAL:
+ pp_cxx_ws_string (pp, "__is_trivial");
+ break;
case CPTK_IS_UNION:
pp_cxx_ws_string (pp, "__is_union");
break;