Commit c6002625 by Kazu Hirata Committed by Kazu Hirata

error.c: Fix comment formatting.

	* error.c: Fix comment formatting.
	* except.c: Likewise.
	* expr.c: Likewise.
	* friend.c: Likewise.
	* g++spec.c: Likewise.
	* init.c: Likewise.
	* lex.c: Likewise.
	* mangle.c: Likewise.
	* method.c: Likewise.
	* optimize.c: Likewise.
	* pt.c: Likewise.
	* rtti.c: Likewise.
	* search.c: Likewise.
	* semantics.c: Likewise.
	* spew.c: Likewise.
	* tree.c: Likewise.
	* typeck.c: Likewise.
	* typeck2.c: Likewise.

From-SVN: r57138
parent f197f1cf
2002-09-14 Kazu Hirata <kazu@cs.umass.edu>
* error.c: Fix comment formatting.
* except.c: Likewise.
* expr.c: Likewise.
* friend.c: Likewise.
* g++spec.c: Likewise.
* init.c: Likewise.
* lex.c: Likewise.
* mangle.c: Likewise.
* method.c: Likewise.
* optimize.c: Likewise.
* pt.c: Likewise.
* rtti.c: Likewise.
* search.c: Likewise.
* semantics.c: Likewise.
* spew.c: Likewise.
* tree.c: Likewise.
* typeck.c: Likewise.
* typeck2.c: Likewise.
2002-09-13 Nathan Sidwell <nathan@codesourcery.com> 2002-09-13 Nathan Sidwell <nathan@codesourcery.com>
* pt.c (unify, ARRAY_TYPE): Element type can be more qualified. * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
......
...@@ -410,7 +410,7 @@ dump_type (t, flags) ...@@ -410,7 +410,7 @@ dump_type (t, flags)
break; break;
case TEMPLATE_TEMPLATE_PARM: case TEMPLATE_TEMPLATE_PARM:
/* For parameters inside template signature. */ /* For parameters inside template signature. */
if (TYPE_IDENTIFIER (t)) if (TYPE_IDENTIFIER (t))
print_tree_identifier (scratch_buffer, TYPE_IDENTIFIER (t)); print_tree_identifier (scratch_buffer, TYPE_IDENTIFIER (t));
else else
...@@ -472,7 +472,7 @@ dump_type (t, flags) ...@@ -472,7 +472,7 @@ dump_type (t, flags)
default: default:
sorry_for_unsupported_tree (t); sorry_for_unsupported_tree (t);
/* Fall through to error. */ /* Fall through to error. */
case ERROR_MARK: case ERROR_MARK:
print_identifier (scratch_buffer, "<type error>"); print_identifier (scratch_buffer, "<type error>");
...@@ -848,7 +848,7 @@ dump_decl (t, flags) ...@@ -848,7 +848,7 @@ dump_decl (t, flags)
{ {
if ((flags & TFF_DECL_SPECIFIERS) if ((flags & TFF_DECL_SPECIFIERS)
&& TREE_CODE (TREE_TYPE (t)) == TEMPLATE_TYPE_PARM) && TREE_CODE (TREE_TYPE (t)) == TEMPLATE_TYPE_PARM)
/* Say `class T' not just `T'. */ /* Say `class T' not just `T'. */
output_add_string (scratch_buffer, "class "); output_add_string (scratch_buffer, "class ");
dump_type (TREE_TYPE (t), flags); dump_type (TREE_TYPE (t), flags);
...@@ -1043,7 +1043,7 @@ dump_template_decl (t, flags) ...@@ -1043,7 +1043,7 @@ dump_template_decl (t, flags)
nreverse(orig_parms); nreverse(orig_parms);
if (DECL_TEMPLATE_TEMPLATE_PARM_P (t)) if (DECL_TEMPLATE_TEMPLATE_PARM_P (t))
/* Say `template<arg> class TT' not just `template<arg> TT'. */ /* Say `template<arg> class TT' not just `template<arg> TT'. */
output_add_string (scratch_buffer, "class "); output_add_string (scratch_buffer, "class ");
} }
...@@ -1073,7 +1073,7 @@ dump_template_decl (t, flags) ...@@ -1073,7 +1073,7 @@ dump_template_decl (t, flags)
/* Pretty print a function decl. There are several ways we want to print a /* Pretty print a function decl. There are several ways we want to print a
function declaration. The TFF_ bits in FLAGS tells us how to behave. function declaration. The TFF_ bits in FLAGS tells us how to behave.
As error can only apply the '#' flag once to give 0 and 1 for V, there As error can only apply the '#' flag once to give 0 and 1 for V, there
is %D which doesn't print the throw specs, and %F which does. */ is %D which doesn't print the throw specs, and %F which does. */
static void static void
dump_function_decl (t, flags) dump_function_decl (t, flags)
...@@ -1167,7 +1167,7 @@ dump_function_decl (t, flags) ...@@ -1167,7 +1167,7 @@ dump_function_decl (t, flags)
/* Print a parameter list. If this is for a member function, the /* Print a parameter list. If this is for a member function, the
member object ptr (and any other hidden args) should have member object ptr (and any other hidden args) should have
already been removed. */ already been removed. */
static void static void
dump_parameters (parmtypes, flags) dump_parameters (parmtypes, flags)
...@@ -1201,7 +1201,7 @@ dump_parameters (parmtypes, flags) ...@@ -1201,7 +1201,7 @@ dump_parameters (parmtypes, flags)
print_right_paren (scratch_buffer); print_right_paren (scratch_buffer);
} }
/* Print an exception specification. T is the exception specification. */ /* Print an exception specification. T is the exception specification. */
static void static void
dump_exception_spec (t, flags) dump_exception_spec (t, flags)
...@@ -1417,7 +1417,7 @@ dump_expr_list (l, flags) ...@@ -1417,7 +1417,7 @@ dump_expr_list (l, flags)
} }
} }
/* Print out an expression E under control of FLAGS. */ /* Print out an expression E under control of FLAGS. */
static void static void
dump_expr (t, flags) dump_expr (t, flags)
......
...@@ -117,7 +117,7 @@ prepare_eh_type (type) ...@@ -117,7 +117,7 @@ prepare_eh_type (type)
} }
/* Build the address of a typeinfo decl for use in the runtime /* Build the address of a typeinfo decl for use in the runtime
matching field of the exception model. */ matching field of the exception model. */
static tree static tree
build_eh_type_type (type) build_eh_type_type (type)
......
...@@ -102,7 +102,7 @@ cxx_expand_expr (exp, target, tmode, modifier) ...@@ -102,7 +102,7 @@ cxx_expand_expr (exp, target, tmode, modifier)
target, tmode, modifier); target, tmode, modifier);
case OFFSET_REF: case OFFSET_REF:
/* Offset refs should not make it through to here. */ /* Offset refs should not make it through to here. */
abort (); abort ();
return const0_rtx; return const0_rtx;
......
...@@ -114,7 +114,7 @@ is_friend (type, supplicant) ...@@ -114,7 +114,7 @@ is_friend (type, supplicant)
else else
context = NULL_TREE; context = NULL_TREE;
/* A namespace is not friend to anybody. */ /* A namespace is not friend to anybody. */
if (context && TREE_CODE (context) == NAMESPACE_DECL) if (context && TREE_CODE (context) == NAMESPACE_DECL)
context = NULL_TREE; context = NULL_TREE;
...@@ -230,7 +230,7 @@ make_friend_class (type, friend_type) ...@@ -230,7 +230,7 @@ make_friend_class (type, friend_type)
A friend of a class or class template can be a function or A friend of a class or class template can be a function or
class template, a specialization of a function template or class template, a specialization of a function template or
class template, or an ordinary (nontemplate) function or class template, or an ordinary (nontemplate) function or
class. */ class. */
if (!is_template_friend) if (!is_template_friend)
;/* ok */ ;/* ok */
else if (TREE_CODE (friend_type) == TYPENAME_TYPE) else if (TREE_CODE (friend_type) == TYPENAME_TYPE)
...@@ -396,14 +396,14 @@ do_friend (ctype, declarator, decl, parmdecls, attrlist, ...@@ -396,14 +396,14 @@ do_friend (ctype, declarator, decl, parmdecls, attrlist,
/* This must be a local class, so pushdecl will be ok, and /* This must be a local class, so pushdecl will be ok, and
insert an unqualified friend into the local scope insert an unqualified friend into the local scope
(rather than the containing namespace scope, which the (rather than the containing namespace scope, which the
next choice will do). */ next choice will do). */
decl = pushdecl (decl); decl = pushdecl (decl);
else else
{ {
/* We can't use pushdecl, as we might be in a template /* We can't use pushdecl, as we might be in a template
class specialization, and pushdecl will insert an class specialization, and pushdecl will insert an
unqualified friend decl into the template parameter unqualified friend decl into the template parameter
scope, rather than the namespace containing it. */ scope, rather than the namespace containing it. */
tree ns = decl_namespace_context (decl); tree ns = decl_namespace_context (decl);
push_nested_namespace (ns); push_nested_namespace (ns);
......
...@@ -299,11 +299,11 @@ lang_specific_driver (in_argc, in_argv, in_added_libraries) ...@@ -299,11 +299,11 @@ lang_specific_driver (in_argc, in_argv, in_added_libraries)
*in_added_libraries = added_libraries; *in_added_libraries = added_libraries;
} }
/* Called before linking. Returns 0 on success and -1 on failure. */ /* Called before linking. Returns 0 on success and -1 on failure. */
int lang_specific_pre_link () /* Not used for C++. */ int lang_specific_pre_link () /* Not used for C++. */
{ {
return 0; return 0;
} }
/* Number of extra output files that lang_specific_pre_link may generate. */ /* Number of extra output files that lang_specific_pre_link may generate. */
int lang_specific_extra_outfiles = 0; /* Not used for C++. */ int lang_specific_extra_outfiles = 0; /* Not used for C++. */
...@@ -185,7 +185,7 @@ build_forced_zero_init (type) ...@@ -185,7 +185,7 @@ build_forced_zero_init (type)
init = integer_zero_node; init = integer_zero_node;
if (TREE_CODE (type) == ENUMERAL_TYPE) if (TREE_CODE (type) == ENUMERAL_TYPE)
/* We must make enumeral types the right type. */ /* We must make enumeral types the right type. */
init = fold (build1 (NOP_EXPR, type, init)); init = fold (build1 (NOP_EXPR, type, init));
} }
...@@ -2126,7 +2126,7 @@ build_new (placement, decl, init, use_global_new) ...@@ -2126,7 +2126,7 @@ build_new (placement, decl, init, use_global_new)
return rval; return rval;
} }
/* Given a Java class, return a decl for the corresponding java.lang.Class. */ /* Given a Java class, return a decl for the corresponding java.lang.Class. */
tree tree
build_java_class_ref (type) build_java_class_ref (type)
...@@ -3218,7 +3218,7 @@ build_delete (type, addr, auto_delete, flags, use_global_delete) ...@@ -3218,7 +3218,7 @@ build_delete (type, addr, auto_delete, flags, use_global_delete)
{ {
/* We will use ADDR multiple times so we must save it. */ /* We will use ADDR multiple times so we must save it. */
addr = save_expr (addr); addr = save_expr (addr);
/* Delete the object. */ /* Delete the object. */
do_delete = build_builtin_delete_call (addr); do_delete = build_builtin_delete_call (addr);
/* Otherwise, treat this like a complete object destructor /* Otherwise, treat this like a complete object destructor
call. */ call. */
......
...@@ -1073,7 +1073,7 @@ do_pending_lang_change () ...@@ -1073,7 +1073,7 @@ do_pending_lang_change ()
pop_lang_context (); pop_lang_context ();
} }
/* Return true if d is in a global scope. */ /* Return true if d is in a global scope. */
static int static int
is_global (d) is_global (d)
......
...@@ -196,7 +196,7 @@ static inline void start_mangling PARAMS ((void)); ...@@ -196,7 +196,7 @@ static inline void start_mangling PARAMS ((void));
static inline const char *finish_mangling PARAMS ((void)); static inline const char *finish_mangling PARAMS ((void));
static tree mangle_special_for_type PARAMS ((tree, const char *)); static tree mangle_special_for_type PARAMS ((tree, const char *));
/* Foreign language functions. */ /* Foreign language functions. */
static void write_java_integer_type_codes PARAMS ((tree)); static void write_java_integer_type_codes PARAMS ((tree));
...@@ -205,7 +205,7 @@ static void write_java_integer_type_codes PARAMS ((tree)); ...@@ -205,7 +205,7 @@ static void write_java_integer_type_codes PARAMS ((tree));
#define write_char(CHAR) \ #define write_char(CHAR) \
obstack_1grow (&G.name_obstack, (CHAR)) obstack_1grow (&G.name_obstack, (CHAR))
/* Append a sized buffer to the end of the mangled representation. */ /* Append a sized buffer to the end of the mangled representation. */
#define write_chars(CHAR, LEN) \ #define write_chars(CHAR, LEN) \
obstack_grow (&G.name_obstack, (CHAR), (LEN)) obstack_grow (&G.name_obstack, (CHAR), (LEN))
...@@ -575,7 +575,7 @@ find_substitution (node) ...@@ -575,7 +575,7 @@ find_substitution (node)
} }
/* Now check the list of available substitutions for this mangling /* Now check the list of available substitutions for this mangling
operation. */ operation. */
for (i = 0; i < size; ++i) for (i = 0; i < size; ++i)
{ {
tree candidate = VARRAY_TREE (G.substitutions, i); tree candidate = VARRAY_TREE (G.substitutions, i);
...@@ -1080,7 +1080,7 @@ write_number (number, unsigned_p, base) ...@@ -1080,7 +1080,7 @@ write_number (number, unsigned_p, base)
/* Write out an integral CST in decimal. Most numbers are small, and /* Write out an integral CST in decimal. Most numbers are small, and
representable in a HOST_WIDE_INT. Occasionally we'll have numbers representable in a HOST_WIDE_INT. Occasionally we'll have numbers
bigger than that, which we must deal with. */ bigger than that, which we must deal with. */
static inline void static inline void
write_integer_cst (cst) write_integer_cst (cst)
...@@ -1091,7 +1091,7 @@ write_integer_cst (cst) ...@@ -1091,7 +1091,7 @@ write_integer_cst (cst)
if (TREE_INT_CST_HIGH (cst) + (sign < 0)) if (TREE_INT_CST_HIGH (cst) + (sign < 0))
{ {
/* A bignum. We do this in chunks, each of which fits in a /* A bignum. We do this in chunks, each of which fits in a
HOST_WIDE_INT. */ HOST_WIDE_INT. */
char buffer[sizeof (HOST_WIDE_INT) * 8 * 2]; char buffer[sizeof (HOST_WIDE_INT) * 8 * 2];
unsigned HOST_WIDE_INT chunk; unsigned HOST_WIDE_INT chunk;
unsigned chunk_digits; unsigned chunk_digits;
...@@ -1101,13 +1101,13 @@ write_integer_cst (cst) ...@@ -1101,13 +1101,13 @@ write_integer_cst (cst)
int done; int done;
/* HOST_WIDE_INT must be at least 32 bits, so 10^9 is /* HOST_WIDE_INT must be at least 32 bits, so 10^9 is
representable. */ representable. */
chunk = 1000000000; chunk = 1000000000;
chunk_digits = 9; chunk_digits = 9;
if (sizeof (HOST_WIDE_INT) >= 8) if (sizeof (HOST_WIDE_INT) >= 8)
{ {
/* It is at least 64 bits, so 10^18 is representable. */ /* It is at least 64 bits, so 10^18 is representable. */
chunk_digits = 18; chunk_digits = 18;
chunk *= chunk; chunk *= chunk;
} }
...@@ -1275,7 +1275,7 @@ static void ...@@ -1275,7 +1275,7 @@ static void
write_discriminator (discriminator) write_discriminator (discriminator)
int discriminator; int discriminator;
{ {
/* If discriminator is zero, don't write anything. Otherwise... */ /* If discriminator is zero, don't write anything. Otherwise... */
if (discriminator > 0) if (discriminator > 0)
{ {
write_char ('_'); write_char ('_');
...@@ -1810,7 +1810,7 @@ write_expression (expr) ...@@ -1810,7 +1810,7 @@ write_expression (expr)
code = TREE_CODE (expr); code = TREE_CODE (expr);
} }
/* Handle template parameters. */ /* Handle template parameters. */
if (code == TEMPLATE_TYPE_PARM if (code == TEMPLATE_TYPE_PARM
|| code == TEMPLATE_TEMPLATE_PARM || code == TEMPLATE_TEMPLATE_PARM
|| code == BOUND_TEMPLATE_TEMPLATE_PARM || code == BOUND_TEMPLATE_TEMPLATE_PARM
......
...@@ -749,7 +749,7 @@ synthesize_method (fndecl) ...@@ -749,7 +749,7 @@ synthesize_method (fndecl)
during the generation of the implicit body points at the place during the generation of the implicit body points at the place
where the attempt to generate the function occurs, giving the where the attempt to generate the function occurs, giving the
user a hint as to why we are attempting to generate the user a hint as to why we are attempting to generate the
function. */ function. */
DECL_SOURCE_LINE (fndecl) = lineno; DECL_SOURCE_LINE (fndecl) = lineno;
DECL_SOURCE_FILE (fndecl) = input_filename; DECL_SOURCE_FILE (fndecl) = input_filename;
......
...@@ -41,7 +41,7 @@ static tree calls_setjmp_r PARAMS ((tree *, int *, void *)); ...@@ -41,7 +41,7 @@ static tree calls_setjmp_r PARAMS ((tree *, int *, void *));
static void update_cloned_parm PARAMS ((tree, tree)); static void update_cloned_parm PARAMS ((tree, tree));
static void dump_function PARAMS ((enum tree_dump_index, tree)); static void dump_function PARAMS ((enum tree_dump_index, tree));
/* Optimize the body of FN. */ /* Optimize the body of FN. */
void void
optimize_function (fn) optimize_function (fn)
...@@ -119,15 +119,15 @@ update_cloned_parm (parm, cloned_parm) ...@@ -119,15 +119,15 @@ update_cloned_parm (parm, cloned_parm)
{ {
DECL_ABSTRACT_ORIGIN (cloned_parm) = parm; DECL_ABSTRACT_ORIGIN (cloned_parm) = parm;
/* We may have taken its address. */ /* We may have taken its address. */
TREE_ADDRESSABLE (cloned_parm) = TREE_ADDRESSABLE (parm); TREE_ADDRESSABLE (cloned_parm) = TREE_ADDRESSABLE (parm);
/* The definition might have different constness. */ /* The definition might have different constness. */
TREE_READONLY (cloned_parm) = TREE_READONLY (parm); TREE_READONLY (cloned_parm) = TREE_READONLY (parm);
TREE_USED (cloned_parm) = TREE_USED (parm); TREE_USED (cloned_parm) = TREE_USED (parm);
/* The name may have changed from the declaration. */ /* The name may have changed from the declaration. */
DECL_NAME (cloned_parm) = DECL_NAME (parm); DECL_NAME (cloned_parm) = DECL_NAME (parm);
DECL_SOURCE_LOCATION (cloned_parm) = DECL_SOURCE_LOCATION (parm); DECL_SOURCE_LOCATION (cloned_parm) = DECL_SOURCE_LOCATION (parm);
} }
...@@ -176,7 +176,7 @@ maybe_clone_body (fn) ...@@ -176,7 +176,7 @@ maybe_clone_body (fn)
DECL_NOT_REALLY_EXTERN (clone) = DECL_NOT_REALLY_EXTERN (fn); DECL_NOT_REALLY_EXTERN (clone) = DECL_NOT_REALLY_EXTERN (fn);
TREE_PUBLIC (clone) = TREE_PUBLIC (fn); TREE_PUBLIC (clone) = TREE_PUBLIC (fn);
/* Adjust the parameter names and locations. */ /* Adjust the parameter names and locations. */
parm = DECL_ARGUMENTS (fn); parm = DECL_ARGUMENTS (fn);
clone_parm = DECL_ARGUMENTS (clone); clone_parm = DECL_ARGUMENTS (clone);
/* Update the `this' parameter, which is always first. */ /* Update the `this' parameter, which is always first. */
...@@ -194,7 +194,7 @@ maybe_clone_body (fn) ...@@ -194,7 +194,7 @@ maybe_clone_body (fn)
{ {
/* Update this parameter. */ /* Update this parameter. */
update_cloned_parm (parm, clone_parm); update_cloned_parm (parm, clone_parm);
/* We should only give unused information for one clone. */ /* We should only give unused information for one clone. */
if (!first) if (!first)
TREE_USED (clone_parm) = 1; TREE_USED (clone_parm) = 1;
} }
...@@ -275,7 +275,7 @@ maybe_clone_body (fn) ...@@ -275,7 +275,7 @@ maybe_clone_body (fn)
return 1; return 1;
} }
/* Dump FUNCTION_DECL FN as tree dump PHASE. */ /* Dump FUNCTION_DECL FN as tree dump PHASE. */
static void static void
dump_function (phase, fn) dump_function (phase, fn)
......
...@@ -381,7 +381,7 @@ maybe_begin_member_template_processing (decl) ...@@ -381,7 +381,7 @@ maybe_begin_member_template_processing (decl)
++inline_parm_levels_used; ++inline_parm_levels_used;
} }
/* Undo the effects of begin_member_template_processing. */ /* Undo the effects of begin_member_template_processing. */
void void
maybe_end_member_template_processing () maybe_end_member_template_processing ()
...@@ -617,7 +617,7 @@ check_specialization_scope () ...@@ -617,7 +617,7 @@ check_specialization_scope ()
error ("enclosing class templates are not explicitly specialized"); error ("enclosing class templates are not explicitly specialized");
} }
/* We've just seen template <>. */ /* We've just seen template <>. */
void void
begin_specialization () begin_specialization ()
...@@ -638,7 +638,7 @@ end_specialization () ...@@ -638,7 +638,7 @@ end_specialization ()
} }
/* Any template <>'s that we have seen thus far are not referring to a /* Any template <>'s that we have seen thus far are not referring to a
function specialization. */ function specialization. */
void void
reset_specialization () reset_specialization ()
...@@ -981,7 +981,7 @@ determine_specialization (template_id, decl, targs_out, ...@@ -981,7 +981,7 @@ determine_specialization (template_id, decl, targs_out,
if (fns == error_mark_node) if (fns == error_mark_node)
return error_mark_node; return error_mark_node;
/* Check for baselinks. */ /* Check for baselinks. */
if (BASELINK_P (fns)) if (BASELINK_P (fns))
fns = BASELINK_FUNCTIONS (fns); fns = BASELINK_FUNCTIONS (fns);
...@@ -1141,7 +1141,7 @@ determine_specialization (template_id, decl, targs_out, ...@@ -1141,7 +1141,7 @@ determine_specialization (template_id, decl, targs_out,
return error_mark_node; return error_mark_node;
} }
/* We have one, and exactly one, match. */ /* We have one, and exactly one, match. */
if (candidates) if (candidates)
{ {
/* It was a specialization of an ordinary member function in a /* It was a specialization of an ordinary member function in a
...@@ -2631,7 +2631,7 @@ push_template_decl_real (decl, is_friend) ...@@ -2631,7 +2631,7 @@ push_template_decl_real (decl, is_friend)
&& DECL_TEMPLATE_SPECIALIZATION (decl)) && DECL_TEMPLATE_SPECIALIZATION (decl))
{ {
/* A specialization of a member template of a template /* A specialization of a member template of a template
class. */ class. */
SET_DECL_TEMPLATE_SPECIALIZATION (tmpl); SET_DECL_TEMPLATE_SPECIALIZATION (tmpl);
DECL_TEMPLATE_INFO (tmpl) = DECL_TEMPLATE_INFO (decl); DECL_TEMPLATE_INFO (tmpl) = DECL_TEMPLATE_INFO (decl);
DECL_TEMPLATE_INFO (decl) = NULL_TREE; DECL_TEMPLATE_INFO (decl) = NULL_TREE;
...@@ -2998,7 +2998,7 @@ convert_nontype_argument (type, expr) ...@@ -2998,7 +2998,7 @@ convert_nontype_argument (type, expr)
case ENUMERAL_TYPE: case ENUMERAL_TYPE:
/* For a non-type template-parameter of integral or enumeration /* For a non-type template-parameter of integral or enumeration
type, integral promotions (_conv.prom_) and integral type, integral promotions (_conv.prom_) and integral
conversions (_conv.integral_) are applied. */ conversions (_conv.integral_) are applied. */
if (!INTEGRAL_TYPE_P (expr_type)) if (!INTEGRAL_TYPE_P (expr_type))
return error_mark_node; return error_mark_node;
...@@ -4726,7 +4726,7 @@ tsubst_friend_function (decl, args) ...@@ -4726,7 +4726,7 @@ tsubst_friend_function (decl, args)
/* Inside pushdecl_namespace_level, we will push into the /* Inside pushdecl_namespace_level, we will push into the
current namespace. However, the friend function should go current namespace. However, the friend function should go
into the namespace of the template. */ into the namespace of the template. */
ns = decl_namespace_context (new_friend); ns = decl_namespace_context (new_friend);
push_nested_namespace (ns); push_nested_namespace (ns);
old_decl = pushdecl_namespace_level (new_friend); old_decl = pushdecl_namespace_level (new_friend);
...@@ -5789,7 +5789,7 @@ tsubst_decl (t, args, type, complain) ...@@ -5789,7 +5789,7 @@ tsubst_decl (t, args, type, complain)
/* The template parameters for this new template are all the /* The template parameters for this new template are all the
template parameters for the old template, except the template parameters for the old template, except the
outermost level of parameters. */ outermost level of parameters. */
DECL_TEMPLATE_PARMS (r) DECL_TEMPLATE_PARMS (r)
= tsubst_template_parms (DECL_TEMPLATE_PARMS (t), args, = tsubst_template_parms (DECL_TEMPLATE_PARMS (t), args,
complain); complain);
...@@ -6774,7 +6774,7 @@ tsubst (t, args, complain, in_decl) ...@@ -6774,7 +6774,7 @@ tsubst (t, args, complain, in_decl)
if (fntype == error_mark_node) if (fntype == error_mark_node)
return error_mark_node; return error_mark_node;
/* Substitue the exception specification. */ /* Substitue the exception specification. */
raises = TYPE_RAISES_EXCEPTIONS (t); raises = TYPE_RAISES_EXCEPTIONS (t);
if (raises) if (raises)
{ {
...@@ -7422,7 +7422,7 @@ tsubst_expr (t, args, complain, in_decl) ...@@ -7422,7 +7422,7 @@ tsubst_expr (t, args, complain, in_decl)
if (decl != error_mark_node) if (decl != error_mark_node)
{ {
if (TREE_CODE (decl) != TYPE_DECL) if (TREE_CODE (decl) != TYPE_DECL)
/* Make sure the type is instantiated now. */ /* Make sure the type is instantiated now. */
complete_type (TREE_TYPE (decl)); complete_type (TREE_TYPE (decl));
if (init) if (init)
DECL_INITIAL (decl) = error_mark_node; DECL_INITIAL (decl) = error_mark_node;
...@@ -7696,7 +7696,7 @@ instantiate_template (tmpl, targ_ptr) ...@@ -7696,7 +7696,7 @@ instantiate_template (tmpl, targ_ptr)
tree spec = instantiate_template (DECL_CLONED_FUNCTION (tmpl), targ_ptr); tree spec = instantiate_template (DECL_CLONED_FUNCTION (tmpl), targ_ptr);
tree clone; tree clone;
/* Look for the clone. */ /* Look for the clone. */
for (clone = TREE_CHAIN (spec); for (clone = TREE_CHAIN (spec);
clone && DECL_CLONED_FUNCTION_P (clone); clone && DECL_CLONED_FUNCTION_P (clone);
clone = TREE_CHAIN (clone)) clone = TREE_CHAIN (clone))
...@@ -8893,7 +8893,7 @@ unify (tparms, targs, parm, arg, strict) ...@@ -8893,7 +8893,7 @@ unify (tparms, targs, parm, arg, strict)
{ {
/* Avoid getting confused about cv-quals; don't recurse here. /* Avoid getting confused about cv-quals; don't recurse here.
Pointers to members should really be just OFFSET_TYPE, not Pointers to members should really be just OFFSET_TYPE, not
this two-level nonsense... */ this two-level nonsense... */
parm = TREE_TYPE (parm); parm = TREE_TYPE (parm);
arg = TREE_TYPE (arg); arg = TREE_TYPE (arg);
...@@ -10074,7 +10074,7 @@ instantiate_decl (d, defer_ok) ...@@ -10074,7 +10074,7 @@ instantiate_decl (d, defer_ok)
/* Don't simply tsubst the function type, as that will give /* Don't simply tsubst the function type, as that will give
duplicate warnings about poor parameter qualifications. duplicate warnings about poor parameter qualifications.
The function arguments are the same as the decl_arguments The function arguments are the same as the decl_arguments
without the top level cv qualifiers. */ without the top level cv qualifiers. */
type = TREE_TYPE (type); type = TREE_TYPE (type);
} }
tsubst (type, args, tf_error | tf_warning, d); tsubst (type, args, tf_error | tf_warning, d);
......
...@@ -62,13 +62,13 @@ Boston, MA 02111-1307, USA. */ ...@@ -62,13 +62,13 @@ Boston, MA 02111-1307, USA. */
/* Accessors for the type_info objects. We need to remember several things /* Accessors for the type_info objects. We need to remember several things
about each of the type_info types. The global tree nodes such as about each of the type_info types. The global tree nodes such as
bltn_desc_type_node are TREE_LISTs, and these macros are used to access bltn_desc_type_node are TREE_LISTs, and these macros are used to access
the required information. */ the required information. */
/* The RECORD_TYPE of a type_info derived class. */ /* The RECORD_TYPE of a type_info derived class. */
#define TINFO_PSEUDO_TYPE(NODE) TREE_TYPE (NODE) #define TINFO_PSEUDO_TYPE(NODE) TREE_TYPE (NODE)
/* The VAR_DECL of the vtable for the type_info derived class. /* The VAR_DECL of the vtable for the type_info derived class.
This is only filled in at the end of the translation. */ This is only filled in at the end of the translation. */
#define TINFO_VTABLE_DECL(NODE) TREE_VALUE (NODE) #define TINFO_VTABLE_DECL(NODE) TREE_VALUE (NODE)
/* The IDENTIFIER_NODE naming the real class. */ /* The IDENTIFIER_NODE naming the real class. */
#define TINFO_REAL_NAME(NODE) TREE_PURPOSE (NODE) #define TINFO_REAL_NAME(NODE) TREE_PURPOSE (NODE)
static tree build_headof PARAMS((tree)); static tree build_headof PARAMS((tree));
...@@ -923,7 +923,7 @@ dfs_class_hint_mark (binfo, data) ...@@ -923,7 +923,7 @@ dfs_class_hint_mark (binfo, data)
return NULL_TREE; return NULL_TREE;
}; };
/* Clear the base's dfs marks, after searching for duplicate bases. */ /* Clear the base's dfs marks, after searching for duplicate bases. */
static tree static tree
dfs_class_hint_unmark (binfo, data) dfs_class_hint_unmark (binfo, data)
...@@ -1104,7 +1104,7 @@ get_pseudo_ti_init (type, var_desc, non_public_p) ...@@ -1104,7 +1104,7 @@ get_pseudo_ti_init (type, var_desc, non_public_p)
/* Prepend the number of bases. */ /* Prepend the number of bases. */
base_inits = tree_cons (NULL_TREE, base_inits = tree_cons (NULL_TREE,
build_int_2 (nbases, 0), base_inits); build_int_2 (nbases, 0), base_inits);
/* Prepend the hint flags. */ /* Prepend the hint flags. */
base_inits = tree_cons (NULL_TREE, base_inits = tree_cons (NULL_TREE,
build_int_2 (hint, 0), base_inits); build_int_2 (hint, 0), base_inits);
...@@ -1146,21 +1146,21 @@ create_pseudo_type_info VPARAMS((const char *real_name, int ident, ...)) ...@@ -1146,21 +1146,21 @@ create_pseudo_type_info VPARAMS((const char *real_name, int ident, ...))
VA_FIXEDARG (ap, const char *, real_name); VA_FIXEDARG (ap, const char *, real_name);
VA_FIXEDARG (ap, int, ident); VA_FIXEDARG (ap, int, ident);
/* Generate the pseudo type name. */ /* Generate the pseudo type name. */
pseudo_name = (char *)alloca (strlen (real_name) + 30); pseudo_name = (char *)alloca (strlen (real_name) + 30);
strcpy (pseudo_name, real_name); strcpy (pseudo_name, real_name);
strcat (pseudo_name, "_pseudo"); strcat (pseudo_name, "_pseudo");
if (ident) if (ident)
sprintf (pseudo_name + strlen (pseudo_name), "%d", ident); sprintf (pseudo_name + strlen (pseudo_name), "%d", ident);
/* First field is the pseudo type_info base class. */ /* First field is the pseudo type_info base class. */
fields[0] = build_decl (FIELD_DECL, NULL_TREE, ti_desc_type_node); fields[0] = build_decl (FIELD_DECL, NULL_TREE, ti_desc_type_node);
/* Now add the derived fields. */ /* Now add the derived fields. */
for (ix = 0; (field_decl = va_arg (ap, tree));) for (ix = 0; (field_decl = va_arg (ap, tree));)
fields[++ix] = field_decl; fields[++ix] = field_decl;
/* Create the pseudo type. */ /* Create the pseudo type. */
pseudo_type = make_aggr_type (RECORD_TYPE); pseudo_type = make_aggr_type (RECORD_TYPE);
finish_builtin_type (pseudo_type, pseudo_name, fields, ix, ptr_type_node); finish_builtin_type (pseudo_type, pseudo_name, fields, ix, ptr_type_node);
TYPE_HAS_CONSTRUCTOR (pseudo_type) = 1; TYPE_HAS_CONSTRUCTOR (pseudo_type) = 1;
...@@ -1214,7 +1214,7 @@ get_pseudo_ti_desc (type) ...@@ -1214,7 +1214,7 @@ get_pseudo_ti_desc (type)
&& TREE_PUBLIC (base_binfo) && TREE_PUBLIC (base_binfo)
&& !TREE_VIA_VIRTUAL (base_binfo) && !TREE_VIA_VIRTUAL (base_binfo)
&& integer_zerop (BINFO_OFFSET (base_binfo))) && integer_zerop (BINFO_OFFSET (base_binfo)))
/* single non-virtual public. */ /* single non-virtual public. */
return si_class_desc_type_node; return si_class_desc_type_node;
else else
{ {
...@@ -1287,7 +1287,7 @@ create_tinfo_types () ...@@ -1287,7 +1287,7 @@ create_tinfo_types ()
("__fundamental_type_info", 0, ("__fundamental_type_info", 0,
NULL); NULL);
/* Array, function and enum type_info. No additional fields. */ /* Array, function and enum type_info. No additional fields. */
ary_desc_type_node = create_pseudo_type_info ary_desc_type_node = create_pseudo_type_info
("__array_type_info", 0, ("__array_type_info", 0,
NULL); NULL);
...@@ -1311,7 +1311,7 @@ create_tinfo_types () ...@@ -1311,7 +1311,7 @@ create_tinfo_types ()
NULL); NULL);
/* Base class internal helper. Pointer to base type, offset to base, /* Base class internal helper. Pointer to base type, offset to base,
flags. */ flags. */
{ {
tree fields[2]; tree fields[2];
...@@ -1323,12 +1323,12 @@ create_tinfo_types () ...@@ -1323,12 +1323,12 @@ create_tinfo_types ()
TYPE_HAS_CONSTRUCTOR (base_desc_type_node) = 1; TYPE_HAS_CONSTRUCTOR (base_desc_type_node) = 1;
} }
/* General hierarchy is created as necessary in this vector. */ /* General hierarchy is created as necessary in this vector. */
vmi_class_desc_type_node = make_tree_vec (10); vmi_class_desc_type_node = make_tree_vec (10);
/* Pointer type_info. Adds two fields, qualification mask /* Pointer type_info. Adds two fields, qualification mask
and pointer to the pointed to type. This is really a descendant of and pointer to the pointed to type. This is really a descendant of
__pbase_type_info. */ __pbase_type_info. */
ptr_desc_type_node = create_pseudo_type_info ptr_desc_type_node = create_pseudo_type_info
("__pointer_type_info", 0, ("__pointer_type_info", 0,
build_decl (FIELD_DECL, NULL_TREE, integer_type_node), build_decl (FIELD_DECL, NULL_TREE, integer_type_node),
...@@ -1462,7 +1462,7 @@ emit_tinfo_decl (decl_ptr, data) ...@@ -1462,7 +1462,7 @@ emit_tinfo_decl (decl_ptr, data)
DECL_INITIAL (decl) = var_init; DECL_INITIAL (decl) = var_init;
cp_finish_decl (decl, var_init, NULL_TREE, 0); cp_finish_decl (decl, var_init, NULL_TREE, 0);
/* cp_finish_decl will have dealt with linkage. */ /* cp_finish_decl will have dealt with linkage. */
/* Say we've dealt with it. */ /* Say we've dealt with it. */
TREE_TYPE (DECL_NAME (decl)) = NULL_TREE; TREE_TYPE (DECL_NAME (decl)) = NULL_TREE;
......
...@@ -204,7 +204,7 @@ lookup_base_r (binfo, base, access, within_current_scope, ...@@ -204,7 +204,7 @@ lookup_base_r (binfo, base, access, within_current_scope,
if (same_type_p (BINFO_TYPE (binfo), base)) if (same_type_p (BINFO_TYPE (binfo), base))
{ {
/* We have found a base. Check against what we have found /* We have found a base. Check against what we have found
already. */ already. */
found = bk_same_type; found = bk_same_type;
if (is_virtual) if (is_virtual)
found = bk_via_virtual; found = bk_via_virtual;
...@@ -311,7 +311,7 @@ lookup_base (t, base, access, kind_ptr) ...@@ -311,7 +311,7 @@ lookup_base (t, base, access, kind_ptr)
base_access access; base_access access;
base_kind *kind_ptr; base_kind *kind_ptr;
{ {
tree binfo = NULL; /* The binfo we've found so far. */ tree binfo = NULL; /* The binfo we've found so far. */
tree t_binfo = NULL; tree t_binfo = NULL;
base_kind bk; base_kind bk;
...@@ -1995,7 +1995,7 @@ look_for_overrides_here (type, fndecl) ...@@ -1995,7 +1995,7 @@ look_for_overrides_here (type, fndecl)
} }
/* Look in TYPE for virtual functions overridden by FNDECL. Check both /* Look in TYPE for virtual functions overridden by FNDECL. Check both
TYPE itself and its bases. */ TYPE itself and its bases. */
static int static int
look_for_overrides_r (type, fndecl) look_for_overrides_r (type, fndecl)
...@@ -2795,7 +2795,7 @@ binfo_for_vtable (var) ...@@ -2795,7 +2795,7 @@ binfo_for_vtable (var)
} }
/* If no secondary base classes matched, return the primary base, if /* If no secondary base classes matched, return the primary base, if
there is one. */ there is one. */
if (CLASSTYPE_HAS_PRIMARY_BASE_P (BINFO_TYPE (main_binfo))) if (CLASSTYPE_HAS_PRIMARY_BASE_P (BINFO_TYPE (main_binfo)))
return get_primary_binfo (main_binfo); return get_primary_binfo (main_binfo);
......
...@@ -586,7 +586,7 @@ finish_switch_stmt (switch_stmt) ...@@ -586,7 +586,7 @@ finish_switch_stmt (switch_stmt)
do_poplevel (); do_poplevel ();
} }
/* Generate the RTL for T, which is a TRY_BLOCK. */ /* Generate the RTL for T, which is a TRY_BLOCK. */
static void static void
genrtl_try_block (t) genrtl_try_block (t)
...@@ -623,7 +623,7 @@ genrtl_try_block (t) ...@@ -623,7 +623,7 @@ genrtl_try_block (t)
} }
} }
/* Generate the RTL for T, which is an EH_SPEC_BLOCK. */ /* Generate the RTL for T, which is an EH_SPEC_BLOCK. */
static void static void
genrtl_eh_spec_block (t) genrtl_eh_spec_block (t)
...@@ -732,7 +732,7 @@ finish_function_handler_sequence (try_block) ...@@ -732,7 +732,7 @@ finish_function_handler_sequence (try_block)
check_handlers (TRY_HANDLERS (try_block)); check_handlers (TRY_HANDLERS (try_block));
} }
/* Generate the RTL for T, which is a HANDLER. */ /* Generate the RTL for T, which is a HANDLER. */
static void static void
genrtl_handler (t) genrtl_handler (t)
...@@ -1003,7 +1003,7 @@ finish_eh_cleanup (cleanup) ...@@ -1003,7 +1003,7 @@ finish_eh_cleanup (cleanup)
add_stmt (r); add_stmt (r);
} }
/* Generate the RTL for a RETURN_INIT. */ /* Generate the RTL for a RETURN_INIT. */
static void static void
genrtl_named_return_value () genrtl_named_return_value ()
...@@ -1633,7 +1633,7 @@ finish_translation_unit () ...@@ -1633,7 +1633,7 @@ finish_translation_unit ()
while (current_namespace != global_namespace) while (current_namespace != global_namespace)
pop_namespace (); pop_namespace ();
/* Do file scope __FUNCTION__ et al. */ /* Do file scope __FUNCTION__ et al. */
finish_fname_decls (); finish_fname_decls ();
finish_file (); finish_file ();
...@@ -1724,7 +1724,7 @@ begin_class_definition (t) ...@@ -1724,7 +1724,7 @@ begin_class_definition (t)
if (t == error_mark_node) if (t == error_mark_node)
return error_mark_node; return error_mark_node;
/* Check the bases are accessible. */ /* Check the bases are accessible. */
decl_type_access_control (TYPE_NAME (t)); decl_type_access_control (TYPE_NAME (t));
reset_type_access_control (); reset_type_access_control ();
......
...@@ -86,7 +86,7 @@ struct unparsed_text GTY(()) ...@@ -86,7 +86,7 @@ struct unparsed_text GTY(())
struct token_chunk *last_chunk; /* End of the token list. */ struct token_chunk *last_chunk; /* End of the token list. */
short last_pos; /* Number of tokens used in the last chunk of short last_pos; /* Number of tokens used in the last chunk of
TOKENS. */ TOKENS. */
short cur_pos; /* Current token in 'cur_chunk', when rescanning. */ short cur_pos; /* Current token in 'cur_chunk', when rescanning. */
struct token_chunk *cur_chunk; /* Current chunk, when rescanning. */ struct token_chunk *cur_chunk; /* Current chunk, when rescanning. */
...@@ -185,7 +185,7 @@ static int first_token; ...@@ -185,7 +185,7 @@ static int first_token;
static GTY(()) tree defarg_fns; static GTY(()) tree defarg_fns;
/* current default parameter */ /* current default parameter */
static GTY(()) tree defarg_parm; static GTY(()) tree defarg_parm;
/* list of unprocessed fns met during current fn. */ /* list of unprocessed fns met during current fn. */
static GTY(()) tree defarg_depfns; static GTY(()) tree defarg_depfns;
/* list of fns with circular defargs */ /* list of fns with circular defargs */
static GTY(()) tree defarg_fnsdone; static GTY(()) tree defarg_fnsdone;
...@@ -668,7 +668,7 @@ do_aggr () ...@@ -668,7 +668,7 @@ do_aggr ()
void void
see_typename () see_typename ()
{ {
/* Only types expected, not even namespaces. */ /* Only types expected, not even namespaces. */
looking_for_typename = 2; looking_for_typename = 2;
if (yychar < 0) if (yychar < 0)
if ((yychar = yylex ()) < 0) yychar = 0; if ((yychar = yylex ()) < 0) yychar = 0;
...@@ -754,7 +754,7 @@ yylex () ...@@ -754,7 +754,7 @@ yylex ()
case PTYPENAME: case PTYPENAME:
case PTYPENAME_DEFN: case PTYPENAME_DEFN:
/* If we see a SCOPE next, restore the old value. /* If we see a SCOPE next, restore the old value.
Otherwise, we got what we want. */ Otherwise, we got what we want. */
looking_for_typename = old_looking_for_typename; looking_for_typename = old_looking_for_typename;
looking_for_template = 0; looking_for_template = 0;
break; break;
...@@ -887,7 +887,7 @@ frob_id (yyc, peek, idp) ...@@ -887,7 +887,7 @@ frob_id (yyc, peek, idp)
case NSNAME: case NSNAME:
case PTYPENAME: case PTYPENAME:
/* If this got special lookup, remember it. In these /* If this got special lookup, remember it. In these
cases, we know it can't be a declarator-id. */ cases, we know it can't be a declarator-id. */
if (got_scope || got_object) if (got_scope || got_object)
*idp = trrr; *idp = trrr;
/* FALLTHROUGH */ /* FALLTHROUGH */
...@@ -1372,7 +1372,7 @@ do_pending_defargs () ...@@ -1372,7 +1372,7 @@ do_pending_defargs ()
/* No need to say what else is dependent, as they will be /* No need to say what else is dependent, as they will be
picked up in another pass. */ picked up in another pass. */
/* Immediately repeat, but marked so that we break the loop. */ /* Immediately repeat, but marked so that we break the loop. */
defarg_fns = current; defarg_fns = current;
TREE_PURPOSE (current) = error_mark_node; TREE_PURPOSE (current) = error_mark_node;
} }
...@@ -1384,7 +1384,7 @@ do_pending_defargs () ...@@ -1384,7 +1384,7 @@ do_pending_defargs ()
} }
/* After parsing all the default arguments, we must clear any that remain, /* After parsing all the default arguments, we must clear any that remain,
which will be part of a circular dependency. */ which will be part of a circular dependency. */
void void
done_pending_defargs () done_pending_defargs ()
{ {
......
...@@ -94,7 +94,7 @@ lvalue_p_1 (ref, treat_class_rvalues_as_lvalues, allow_cast_as_lvalue) ...@@ -94,7 +94,7 @@ lvalue_p_1 (ref, treat_class_rvalues_as_lvalues, allow_cast_as_lvalue)
/* If expression doesn't change the type, we consider it as an /* If expression doesn't change the type, we consider it as an
lvalue even when cast_as_lvalue extension isn't selected. lvalue even when cast_as_lvalue extension isn't selected.
That's because parts of the compiler are alleged to be sloppy That's because parts of the compiler are alleged to be sloppy
about sticking in NOP_EXPR node for no good reason. */ about sticking in NOP_EXPR node for no good reason. */
if (allow_cast_as_lvalue || if (allow_cast_as_lvalue ||
same_type_p (TYPE_MAIN_VARIANT (TREE_TYPE (ref)), same_type_p (TYPE_MAIN_VARIANT (TREE_TYPE (ref)),
TYPE_MAIN_VARIANT (TREE_TYPE (TREE_OPERAND (ref, 0))))) TYPE_MAIN_VARIANT (TREE_TYPE (TREE_OPERAND (ref, 0)))))
...@@ -1027,7 +1027,7 @@ get_first_fn (from) ...@@ -1027,7 +1027,7 @@ get_first_fn (from)
tree from; tree from;
{ {
my_friendly_assert (is_overloaded_fn (from), 9); my_friendly_assert (is_overloaded_fn (from), 9);
/* A baselink is also considered an overloaded function. */ /* A baselink is also considered an overloaded function. */
if (BASELINK_P (from)) if (BASELINK_P (from))
from = BASELINK_FUNCTIONS (from); from = BASELINK_FUNCTIONS (from);
return OVL_CURRENT (from); return OVL_CURRENT (from);
...@@ -1044,7 +1044,7 @@ bound_pmf_p (t) ...@@ -1044,7 +1044,7 @@ bound_pmf_p (t)
&& TYPE_PTRMEMFUNC_P (TREE_TYPE (TREE_OPERAND (t, 1)))); && TYPE_PTRMEMFUNC_P (TREE_TYPE (TREE_OPERAND (t, 1))));
} }
/* Return a new OVL node, concatenating it with the old one. */ /* Return a new OVL node, concatenating it with the old one. */
tree tree
ovl_cons (decl, chain) ovl_cons (decl, chain)
...@@ -1898,7 +1898,7 @@ maybe_dummy_object (type, binfop) ...@@ -1898,7 +1898,7 @@ maybe_dummy_object (type, binfop)
if (current_class_ref && context == current_class_type if (current_class_ref && context == current_class_type
/* Kludge: Make sure that current_class_type is actually /* Kludge: Make sure that current_class_type is actually
correct. It might not be if we're in the middle of correct. It might not be if we're in the middle of
tsubst_default_argument. */ tsubst_default_argument. */
&& same_type_p (TYPE_MAIN_VARIANT (TREE_TYPE (current_class_ref)), && same_type_p (TYPE_MAIN_VARIANT (TREE_TYPE (current_class_ref)),
current_class_type)) current_class_type))
decl = current_class_ref; decl = current_class_ref;
...@@ -2070,7 +2070,7 @@ handle_init_priority_attribute (node, name, args, flags, no_add_attrs) ...@@ -2070,7 +2070,7 @@ handle_init_priority_attribute (node, name, args, flags, no_add_attrs)
/* Static objects in functions are initialized the /* Static objects in functions are initialized the
first time control passes through that first time control passes through that
function. This is not precise enough to pin down an function. This is not precise enough to pin down an
init_priority value, so don't allow it. */ init_priority value, so don't allow it. */
|| current_function_decl) || current_function_decl)
{ {
error ("can only use `%s' attribute on file-scope definitions of objects of class type", error ("can only use `%s' attribute on file-scope definitions of objects of class type",
......
...@@ -491,7 +491,7 @@ composite_pointer_type (t1, t2, arg1, arg2, location) ...@@ -491,7 +491,7 @@ composite_pointer_type (t1, t2, arg1, arg2, location)
return t1; return t1;
/* Deal with pointer-to-member functions in the same way as we deal /* Deal with pointer-to-member functions in the same way as we deal
with pointers to functions. */ with pointers to functions. */
if (TYPE_PTRMEMFUNC_P (t1)) if (TYPE_PTRMEMFUNC_P (t1))
t1 = TYPE_PTRMEMFUNC_FN_TYPE (t1); t1 = TYPE_PTRMEMFUNC_FN_TYPE (t1);
if (TYPE_PTRMEMFUNC_P (t2)) if (TYPE_PTRMEMFUNC_P (t2))
...@@ -800,11 +800,11 @@ comp_except_specs (t1, t2, exact) ...@@ -800,11 +800,11 @@ comp_except_specs (t1, t2, exact)
if (t1 == t2) if (t1 == t2)
return 1; return 1;
if (t1 == NULL_TREE) /* T1 is ... */ if (t1 == NULL_TREE) /* T1 is ... */
return t2 == NULL_TREE || !exact; return t2 == NULL_TREE || !exact;
if (!TREE_VALUE (t1)) /* t1 is EMPTY */ if (!TREE_VALUE (t1)) /* t1 is EMPTY */
return t2 != NULL_TREE && !TREE_VALUE (t2); return t2 != NULL_TREE && !TREE_VALUE (t2);
if (t2 == NULL_TREE) /* T2 is ... */ if (t2 == NULL_TREE) /* T2 is ... */
return 0; return 0;
if (TREE_VALUE (t1) && !TREE_VALUE (t2)) /* T2 is EMPTY, T1 is not */ if (TREE_VALUE (t1) && !TREE_VALUE (t2)) /* T2 is EMPTY, T1 is not */
return !exact; return !exact;
...@@ -2522,7 +2522,7 @@ build_array_ref (array, idx) ...@@ -2522,7 +2522,7 @@ build_array_ref (array, idx)
With the final ISO C++ rules, such an optimization is With the final ISO C++ rules, such an optimization is
incorrect: A pointer to a derived member can be static_cast incorrect: A pointer to a derived member can be static_cast
to pointer-to-base-member, as long as the dynamic object to pointer-to-base-member, as long as the dynamic object
later has the right member. */ later has the right member. */
tree tree
get_member_function_from_ptrfunc (instance_ptrptr, function) get_member_function_from_ptrfunc (instance_ptrptr, function)
...@@ -2544,7 +2544,7 @@ get_member_function_from_ptrfunc (instance_ptrptr, function) ...@@ -2544,7 +2544,7 @@ get_member_function_from_ptrfunc (instance_ptrptr, function)
{ {
/* Extracting the function address from a pmf is only /* Extracting the function address from a pmf is only
allowed with -Wno-pmf-conversions. It only works for allowed with -Wno-pmf-conversions. It only works for
pmf constants. */ pmf constants. */
e1 = build_addr_func (PTRMEM_CST_MEMBER (function)); e1 = build_addr_func (PTRMEM_CST_MEMBER (function));
e1 = convert (fntype, e1); e1 = convert (fntype, e1);
return e1; return e1;
...@@ -2583,7 +2583,7 @@ get_member_function_from_ptrfunc (instance_ptrptr, function) ...@@ -2583,7 +2583,7 @@ get_member_function_from_ptrfunc (instance_ptrptr, function)
} }
/* Convert down to the right base before using the instance. First /* Convert down to the right base before using the instance. First
use the type... */ use the type... */
basetype = TYPE_METHOD_BASETYPE (TREE_TYPE (fntype)); basetype = TYPE_METHOD_BASETYPE (TREE_TYPE (fntype));
basetype = lookup_base (TREE_TYPE (TREE_TYPE (instance_ptr)), basetype = lookup_base (TREE_TYPE (TREE_TYPE (instance_ptr)),
basetype, ba_check, NULL); basetype, ba_check, NULL);
...@@ -4292,7 +4292,7 @@ build_unary_op (code, xarg, noconvert) ...@@ -4292,7 +4292,7 @@ build_unary_op (code, xarg, noconvert)
&& (TREE_CODE (TREE_OPERAND (TREE_OPERAND (arg, 0), 0)) && (TREE_CODE (TREE_OPERAND (TREE_OPERAND (arg, 0), 0))
== INTEGER_CST)) == INTEGER_CST))
{ {
/* offsetof idiom, fold it. */ /* offsetof idiom, fold it. */
tree field = TREE_OPERAND (arg, 1); tree field = TREE_OPERAND (arg, 1);
tree rval = build_unary_op (ADDR_EXPR, TREE_OPERAND (arg, 0), 0); tree rval = build_unary_op (ADDR_EXPR, TREE_OPERAND (arg, 0), 0);
tree binfo = lookup_base (TREE_TYPE (TREE_TYPE (rval)), tree binfo = lookup_base (TREE_TYPE (TREE_TYPE (rval)),
...@@ -4583,7 +4583,7 @@ build_x_compound_expr (list) ...@@ -4583,7 +4583,7 @@ build_x_compound_expr (list)
if (! TREE_SIDE_EFFECTS (TREE_VALUE (list))) if (! TREE_SIDE_EFFECTS (TREE_VALUE (list)))
{ {
/* FIXME: This test should be in the implicit cast to void of the LHS. */ /* FIXME: This test should be in the implicit cast to void of the LHS. */
/* the left-hand operand of a comma expression is like an expression /* the left-hand operand of a comma expression is like an expression
statement: we should warn if it doesn't have any side-effects, statement: we should warn if it doesn't have any side-effects,
unless it was explicitly cast to (void). */ unless it was explicitly cast to (void). */
...@@ -4694,12 +4694,12 @@ build_static_cast (type, expr) ...@@ -4694,12 +4694,12 @@ build_static_cast (type, expr)
? can_convert_arg (type, intype, expr) ? can_convert_arg (type, intype, expr)
: can_convert_arg (strip_all_pointer_quals (type), : can_convert_arg (strip_all_pointer_quals (type),
strip_all_pointer_quals (intype), expr)) strip_all_pointer_quals (intype), expr))
/* This is a standard conversion. */ /* This is a standard conversion. */
ok = 1; ok = 1;
else if (TYPE_PTROB_P (type) && TYPE_PTROB_P (intype)) else if (TYPE_PTROB_P (type) && TYPE_PTROB_P (intype))
{ {
/* They're pointers to objects. They must be aggregates that /* They're pointers to objects. They must be aggregates that
are related non-virtually. */ are related non-virtually. */
base_kind kind; base_kind kind;
if (IS_AGGR_TYPE (TREE_TYPE (type)) && IS_AGGR_TYPE (TREE_TYPE (intype)) if (IS_AGGR_TYPE (TREE_TYPE (type)) && IS_AGGR_TYPE (TREE_TYPE (intype))
...@@ -4712,7 +4712,7 @@ build_static_cast (type, expr) ...@@ -4712,7 +4712,7 @@ build_static_cast (type, expr)
{ {
/* They're pointers to members. The pointed to objects must be /* They're pointers to members. The pointed to objects must be
the same (ignoring CV qualifiers), and the containing classes the same (ignoring CV qualifiers), and the containing classes
must be related non-virtually. */ must be related non-virtually. */
base_kind kind; base_kind kind;
if (same_type_p if (same_type_p
...@@ -5510,7 +5510,7 @@ get_delta_difference (from, to, force) ...@@ -5510,7 +5510,7 @@ get_delta_difference (from, to, force)
if (virt_binfo) if (virt_binfo)
{ {
/* This is a reinterpret cast, we choose to do nothing. */ /* This is a reinterpret cast, we choose to do nothing. */
warning ("pointer to member cast via virtual base `%T' of `%T'", warning ("pointer to member cast via virtual base `%T' of `%T'",
BINFO_TYPE (virt_binfo), BINFO_TYPE (virt_binfo),
BINFO_TYPE (BINFO_INHERITANCE_CHAIN (virt_binfo))); BINFO_TYPE (BINFO_INHERITANCE_CHAIN (virt_binfo)));
...@@ -5528,7 +5528,7 @@ get_delta_difference (from, to, force) ...@@ -5528,7 +5528,7 @@ get_delta_difference (from, to, force)
virt_binfo = binfo_from_vbase (binfo); virt_binfo = binfo_from_vbase (binfo);
if (virt_binfo) if (virt_binfo)
{ {
/* This is a reinterpret cast, we choose to do nothing. */ /* This is a reinterpret cast, we choose to do nothing. */
if (force) if (force)
warning ("pointer to member cast via virtual base `%T' of `%T'", warning ("pointer to member cast via virtual base `%T' of `%T'",
BINFO_TYPE (virt_binfo), BINFO_TYPE (virt_binfo),
...@@ -6149,7 +6149,7 @@ check_return_expr (retval) ...@@ -6149,7 +6149,7 @@ check_return_expr (retval)
{ {
if (in_function_try_handler) if (in_function_try_handler)
/* If a return statement appears in a handler of the /* If a return statement appears in a handler of the
function-try-block of a constructor, the program is ill-formed. */ function-try-block of a constructor, the program is ill-formed. */
error ("cannot return from a handler of a function-try-block of a constructor"); error ("cannot return from a handler of a function-try-block of a constructor");
else if (retval) else if (retval)
/* You can't return a value from a constructor. */ /* You can't return a value from a constructor. */
...@@ -6270,7 +6270,7 @@ check_return_expr (retval) ...@@ -6270,7 +6270,7 @@ check_return_expr (retval)
/* First convert the value to the function's return type, then /* First convert the value to the function's return type, then
to the type of return value's location to handle the to the type of return value's location to handle the
case that functype is smaller than the valtype. */ case that functype is smaller than the valtype. */
retval = convert_for_initialization retval = convert_for_initialization
(NULL_TREE, functype, retval, LOOKUP_NORMAL|LOOKUP_ONLYCONVERTING, (NULL_TREE, functype, retval, LOOKUP_NORMAL|LOOKUP_ONLYCONVERTING,
"return", NULL_TREE, 0); "return", NULL_TREE, 0);
......
...@@ -514,7 +514,7 @@ digest_init (type, init, tail) ...@@ -514,7 +514,7 @@ digest_init (type, init, tail)
if (TREE_CODE (init) == ERROR_MARK) if (TREE_CODE (init) == ERROR_MARK)
/* __PRETTY_FUNCTION__'s initializer is a bogus expression inside /* __PRETTY_FUNCTION__'s initializer is a bogus expression inside
a template function. This gets substituted during instantiation. */ a template function. This gets substituted during instantiation. */
return init; return init;
/* We must strip the outermost array type when completing the type, /* We must strip the outermost array type when completing the type,
...@@ -1403,7 +1403,7 @@ add_exception_specifier (list, spec, complain) ...@@ -1403,7 +1403,7 @@ add_exception_specifier (list, spec, complain)
} }
/* Combine the two exceptions specifier lists LIST and ADD, and return /* Combine the two exceptions specifier lists LIST and ADD, and return
their union. */ their union. */
tree tree
merge_exception_specifiers (list, add) merge_exception_specifiers (list, add)
......
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