Commit fd4de5ff by Mark Mitchell Committed by Mark Mitchell

pt.c (check_specialization_scope): Fix spelling error.

	* pt.c (check_specialization_scope): Fix spelling error.
	(check_explicit_specialization): Remove code to handle explicit
	specializations in class scope; they are now correctly diagnosed
	as errors.

From-SVN: r22414
parent 028d0b2a
1998-09-14 Mark Mitchell <mark@markmitchell.com>
* pt.c (check_specialization_scope): Fix spelling error.
(check_explicit_specialization): Remove code to handle explicit
specializations in class scope; they are now correctly diagnosed
as errors.
1998-09-10 Mark Mitchell <mark@markmitchell.com> 1998-09-10 Mark Mitchell <mark@markmitchell.com>
* decl.c (pushdecl): Don't copy types if the * decl.c (pushdecl): Don't copy types if the
......
...@@ -605,7 +605,7 @@ check_specialization_scope () ...@@ -605,7 +605,7 @@ check_specialization_scope ()
explicitly specialize a class member template if its enclosing explicitly specialize a class member template if its enclosing
class templates are not explicitly specialized as well. */ class templates are not explicitly specialized as well. */
if (current_template_parms) if (current_template_parms)
cp_error ("enclosing class templates are not explicit specialized"); cp_error ("enclosing class templates are not explicitly specialized");
} }
/* We've just seen template <>. */ /* We've just seen template <>. */
...@@ -1031,15 +1031,8 @@ determine_specialization (template_id, decl, targs_out, ...@@ -1031,15 +1031,8 @@ determine_specialization (template_id, decl, targs_out,
FLAGS is a bitmask consisting of the following flags: FLAGS is a bitmask consisting of the following flags:
1: We are being called by finish_struct. (We are unable to
determine what template is specialized by an in-class
declaration until the class definition is complete, so
finish_struct_methods calls this function again later to finish
the job.)
2: The function has a definition. 2: The function has a definition.
4: The function is a friend. 4: The function is a friend.
8: The function is known to be a specialization of a member
template.
The TEMPLATE_COUNT is the number of references to qualifying The TEMPLATE_COUNT is the number of references to qualifying
template classes that appeared in the name of the function. For template classes that appeared in the name of the function. For
...@@ -1070,18 +1063,15 @@ check_explicit_specialization (declarator, decl, template_count, flags) ...@@ -1070,18 +1063,15 @@ check_explicit_specialization (declarator, decl, template_count, flags)
int template_count; int template_count;
int flags; int flags;
{ {
int finish_member = flags & 1;
int have_def = flags & 2; int have_def = flags & 2;
int is_friend = flags & 4; int is_friend = flags & 4;
int specialization = 0; int specialization = 0;
int explicit_instantiation = 0; int explicit_instantiation = 0;
int member_specialization = flags & 8; int member_specialization = 0;
tree ctype = DECL_CLASS_CONTEXT (decl); tree ctype = DECL_CLASS_CONTEXT (decl);
tree dname = DECL_NAME (decl); tree dname = DECL_NAME (decl);
if (!finish_member)
{
if (processing_specialization) if (processing_specialization)
{ {
/* The last template header was of the form template <>. */ /* The last template header was of the form template <>. */
...@@ -1191,7 +1181,6 @@ check_explicit_specialization (declarator, decl, template_count, flags) ...@@ -1191,7 +1181,6 @@ check_explicit_specialization (declarator, decl, template_count, flags)
return decl; return decl;
} }
} }
}
if (specialization || member_specialization) if (specialization || member_specialization)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment