diff options
author | Jonathan Wakely <jwakely.gcc@gmail.com> | 2011-12-15 10:02:45 +0000 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2011-12-15 10:02:45 +0000 |
commit | b3908fcc0def5f1d0318bd826d889e557ed4dee0 (patch) | |
tree | b5ec06214bfe64f832b32feca5392a5e7503ad08 /gcc/c-family | |
parent | d36971dd86653e81a8dba44f34f777c538b45631 (diff) | |
download | gcc-b3908fcc0def5f1d0318bd826d889e557ed4dee0.tar.gz |
re PR libstdc++/51365 (cannot use final empty class in std::tuple)
c-family:
PR libstdc++/51365
* c-common.c (RID_IS_FINAL): Add.
* c-common.h (RID_IS_FINAL): Add.
cp:
PR libstdc++/51365
* cp-tree.h (CPTK_IS_FINAL): Add.
* parser.c (cp_parser_translation_unit): Handle RID_IS_FINAL.
(cp_parser_primary_expression, cp_parser_trait_expr): Likewise.
* semantics.c (trait_expr_value, finish_trait_expr): Handle
CPTK_IS_FINAL.
* cxx-pretty-print.c (pp_cxx_trait_expression): Likewise.
testsuite:
PR libstdc++/51365
* g++.dg/ext/is_final.C: New.
From-SVN: r182360
Diffstat (limited to 'gcc/c-family')
-rw-r--r-- | gcc/c-family/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/c-family/c-common.c | 1 | ||||
-rw-r--r-- | gcc/c-family/c-common.h | 12 |
3 files changed, 13 insertions, 6 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index 075da2f43b3..78854e2f81b 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,9 @@ +2011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com> + + PR libstdc++/51365 + * c-common.c (RID_IS_FINAL): Add. + * c-common.h (RID_IS_FINAL): Add. + 2011-11-30 Iain Sandoe <iains@gcc.gnu.org> * c.opt (fgnu-runtime): Provide full description. diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c index fbbcb3841dd..3e50dcf924f 100644 --- a/gcc/c-family/c-common.c +++ b/gcc/c-family/c-common.c @@ -462,6 +462,7 @@ const struct c_common_resword c_common_reswords[] = { "__is_convertible_to", RID_IS_CONVERTIBLE_TO, D_CXXONLY }, { "__is_empty", RID_IS_EMPTY, D_CXXONLY }, { "__is_enum", RID_IS_ENUM, D_CXXONLY }, + { "__is_final", RID_IS_FINAL, D_CXXONLY }, { "__is_literal_type", RID_IS_LITERAL_TYPE, D_CXXONLY }, { "__is_pod", RID_IS_POD, D_CXXONLY }, { "__is_polymorphic", RID_IS_POLYMORPHIC, D_CXXONLY }, diff --git a/gcc/c-family/c-common.h b/gcc/c-family/c-common.h index 8ef95aa0b17..103c5816ac4 100644 --- a/gcc/c-family/c-common.h +++ b/gcc/c-family/c-common.h @@ -134,7 +134,7 @@ enum rid RID_CONSTCAST, RID_DYNCAST, RID_REINTCAST, RID_STATCAST, /* C++ extensions */ - RID_BASES, RID_DIRECT_BASES, + RID_BASES, RID_DIRECT_BASES, RID_HAS_NOTHROW_ASSIGN, RID_HAS_NOTHROW_CONSTRUCTOR, RID_HAS_NOTHROW_COPY, RID_HAS_TRIVIAL_ASSIGN, RID_HAS_TRIVIAL_CONSTRUCTOR, RID_HAS_TRIVIAL_COPY, @@ -142,12 +142,12 @@ enum rid RID_IS_ABSTRACT, RID_IS_BASE_OF, RID_IS_CLASS, RID_IS_CONVERTIBLE_TO, RID_IS_EMPTY, RID_IS_ENUM, - RID_IS_LITERAL_TYPE, RID_IS_POD, - RID_IS_POLYMORPHIC, RID_IS_STD_LAYOUT, - RID_IS_TRIVIAL, RID_IS_UNION, - RID_UNDERLYING_TYPE, + RID_IS_FINAL, RID_IS_LITERAL_TYPE, + RID_IS_POD, RID_IS_POLYMORPHIC, + RID_IS_STD_LAYOUT, RID_IS_TRIVIAL, + RID_IS_UNION, RID_UNDERLYING_TYPE, - /* C++0x */ + /* C++11 */ RID_CONSTEXPR, RID_DECLTYPE, RID_NOEXCEPT, RID_NULLPTR, RID_STATIC_ASSERT, /* Objective-C ("AT" reserved words - they are only keywords when |