diff options
author | Jason Merrill <jason@redhat.com> | 2010-06-07 16:42:37 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2010-06-07 16:42:37 -0400 |
commit | 01628e543b8867e4c4ca5724d4982caae7f0bc1a (patch) | |
tree | 162d7f5ea6f6051c882ece33106ad652f869918c /gcc/cp/pt.c | |
parent | 55cdb6b69069481ecf19ff07d0ebb23208bc8162 (diff) | |
download | gcc-01628e543b8867e4c4ca5724d4982caae7f0bc1a.zip gcc-01628e543b8867e4c4ca5724d4982caae7f0bc1a.tar.gz gcc-01628e543b8867e4c4ca5724d4982caae7f0bc1a.tar.bz2 |
cp-tree.h (COMPLETE_OR_OPEN_TYPE_P): New macro.
* cp-tree.h (COMPLETE_OR_OPEN_TYPE_P): New macro.
* init.c (build_offset_ref): Use it.
* pt.c (maybe_process_partial_specialization): Use it.
(instantiate_class_template): Use it.
* search.c (lookup_base): Use it.
From-SVN: r160398
Diffstat (limited to 'gcc/cp/pt.c')
-rw-r--r-- | gcc/cp/pt.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index fd93b1b..b62a9bc 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -891,7 +891,7 @@ maybe_process_partial_specialization (tree type) *slot = GGC_NEW (spec_entry); **slot = elt; } - else if (COMPLETE_TYPE_P (inst) || TYPE_BEING_DEFINED (inst)) + else if (COMPLETE_OR_OPEN_TYPE_P (inst)) /* But if we've had an implicit instantiation, that's a problem ([temp.expl.spec]/6). */ error ("specialization %qT after instantiation %qT", @@ -7700,8 +7700,7 @@ instantiate_class_template (tree type) if (type == error_mark_node) return error_mark_node; - if (TYPE_BEING_DEFINED (type) - || COMPLETE_TYPE_P (type) + if (COMPLETE_OR_OPEN_TYPE_P (type) || uses_template_parms (type)) return type; @@ -7796,8 +7795,7 @@ instantiate_class_template (tree type) instantiate it, and that lookup should instantiate the enclosing class. */ gcc_assert (!DECL_CLASS_SCOPE_P (TYPE_MAIN_DECL (pattern)) - || COMPLETE_TYPE_P (TYPE_CONTEXT (type)) - || TYPE_BEING_DEFINED (TYPE_CONTEXT (type))); + || COMPLETE_OR_OPEN_TYPE_P (TYPE_CONTEXT (type))); base_list = NULL_TREE; if (BINFO_N_BASE_BINFOS (pbinfo)) |