diff options
author | Mark Mitchell <mark@codesourcery.com> | 2005-04-08 19:39:59 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2005-04-08 19:39:59 +0000 |
commit | 12af7ba340f80ef1222034ebe0ce88a4130a0462 (patch) | |
tree | 7269b44542fb5a413a12a9ea81b3d385f85036dc /gcc/cp/cp-tree.h | |
parent | 01d87b6f3da40f38bfda6a538316fb8e6ce9a888 (diff) | |
download | gcc-12af7ba340f80ef1222034ebe0ce88a4130a0462.zip gcc-12af7ba340f80ef1222034ebe0ce88a4130a0462.tar.gz gcc-12af7ba340f80ef1222034ebe0ce88a4130a0462.tar.bz2 |
re PR c++/20145 (template "class has virtual functions ... " is not suppressed with -isystem)
* cp-tree.def (TINST_LEVEL): Document TINST_IN_SYSTEM_HEADER_P.
* cp-tree.h (struct tinst_level): Add in_system_header_p.
(TINST_IN_SYSTEM_HEADER_P): New macro.
(make_tinst_level): Remove.
* pt.c (lookup_template_class): Preserve DECL_IN_SYSTEM_HEADER on
the instantiated class.
(push_tinst_level): Do not use make_tinst_level. Set
TINST_IN_SYSTEM_HEADER_P.
(pop_tinst_level): Likewise.
(instantiate_class_template): Set in_system_header.
(instantiate_pending_templates): Likewise.
* tree.c (make_tinst_level): Remove.
PR c++/20145
* g++.dg/warn/Wdtor1.C: New test.
From-SVN: r97854
Diffstat (limited to 'gcc/cp/cp-tree.h')
-rw-r--r-- | gcc/cp/cp-tree.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index b83b5dc..1f773c0 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -221,6 +221,7 @@ struct tinst_level_s GTY(()) struct tree_common common; tree decl; location_t locus; + int in_system_header_p; }; typedef struct tinst_level_s * tinst_level_t; @@ -3121,6 +3122,8 @@ typedef enum unification_kind_t { (((tinst_level_t) TINST_LEVEL_CHECK (NODE))->decl) #define TINST_LOCATION(NODE) \ (((tinst_level_t) TINST_LEVEL_CHECK (NODE))->locus) +#define TINST_IN_SYSTEM_HEADER_P(NODE) \ + (((tinst_level_t) TINST_LEVEL_CHECK (NODE))->in_system_header_p) /* in class.c */ @@ -4244,7 +4247,6 @@ extern tree build_dummy_object (tree); extern tree maybe_dummy_object (tree, tree *); extern int is_dummy_object (tree); extern const struct attribute_spec cxx_attribute_table[]; -extern tree make_tinst_level (tree, location_t); extern tree make_ptrmem_cst (tree, tree); extern tree cp_build_type_attribute_variant (tree, tree); extern tree cp_build_qualified_type_real (tree, int, tsubst_flags_t); |