Commit 0cbd7506 by Mike Stump

Canonicalize whitespace.

From-SVN: r100965
parent cbcabe5b
...@@ -6378,7 +6378,7 @@ ...@@ -6378,7 +6378,7 @@
(cp_parser_direct_declarator): Likewise. (cp_parser_direct_declarator): Likewise.
* pt.c (tsubst): Likewise. * pt.c (tsubst): Likewise.
(tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
for COMPONENT_REF. for COMPONENT_REF.
* semantics.c (finish_non_static_data_member): Add new operand * semantics.c (finish_non_static_data_member): Add new operand
for COMPONENT_REF. for COMPONENT_REF.
* typeck.c (build_class_member_access_expr): Likewise. * typeck.c (build_class_member_access_expr): Likewise.
......
...@@ -454,8 +454,8 @@ ...@@ -454,8 +454,8 @@
Greg McGary <gkm@gnu.org> Greg McGary <gkm@gnu.org>
* decl.c (duplicate_decls): Merge * decl.c (duplicate_decls): Merge
DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT, DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT,
DECL_NO_CHECK_MEMORY_USAGE, DECL_NO_LIMIT_STACK. DECL_NO_CHECK_MEMORY_USAGE, DECL_NO_LIMIT_STACK.
1999-12-02 Mike Stump <mrs@wrs.com> 1999-12-02 Mike Stump <mrs@wrs.com>
...@@ -860,7 +860,7 @@ Thu Nov 11 12:42:11 MST 1999 Diego Novillo <dnovillo@cygnus.com> ...@@ -860,7 +860,7 @@ Thu Nov 11 12:42:11 MST 1999 Diego Novillo <dnovillo@cygnus.com>
* pt.c (tsubst_enum): Adjust according to build_enumerator changes. * pt.c (tsubst_enum): Adjust according to build_enumerator changes.
Wed Nov 10 12:43:21 1999 Philippe De Muyter <phdm@macqel.be> Wed Nov 10 12:43:21 1999 Philippe De Muyter <phdm@macqel.be>
Kaveh R. Ghazi <ghazi@caip.rutgers.edu> Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* cp-tree.h: Test `GCC_VERSION', not `HAVE_GCC_VERSION'. * cp-tree.h: Test `GCC_VERSION', not `HAVE_GCC_VERSION'.
...@@ -2183,8 +2183,8 @@ Sun Sep 12 23:29:07 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> ...@@ -2183,8 +2183,8 @@ Sun Sep 12 23:29:07 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* g++spec.c: Include gcc.h. * g++spec.c: Include gcc.h.
(lang_specific_driver): Constify a char*. Call xcalloc, not (lang_specific_driver): Constify a char*. Call xcalloc, not
xmalloc/bzero. All calls to the function pointer parameter now xmalloc/bzero. All calls to the function pointer parameter now
explicitly call `fatal'. explicitly call `fatal'.
1999-09-12 Mark Mitchell <mark@codesourcery.com> 1999-09-12 Mark Mitchell <mark@codesourcery.com>
...@@ -4791,7 +4791,7 @@ Wed Jul 7 01:26:47 1999 Alexandre Oliva <oliva@dcc.unicamp.br> ...@@ -4791,7 +4791,7 @@ Wed Jul 7 01:26:47 1999 Alexandre Oliva <oliva@dcc.unicamp.br>
(pt.c): Or CP_TYPE_QUALS for an ERROR_MARK. (pt.c): Or CP_TYPE_QUALS for an ERROR_MARK.
(typeck.c): Or TYPE_MAIN_VARIANT for a type. (typeck.c): Or TYPE_MAIN_VARIANT for a type.
* pt.c (for_each_template_parm): Rework to match documentation. * pt.c (for_each_template_parm): Rework to match documentation.
Don't be fooled by a COMPONENT_REF with no TREE_TYPE. Don't be fooled by a COMPONENT_REF with no TREE_TYPE.
1999-05-20 Jason Merrill <jason@yorick.cygnus.com> 1999-05-20 Jason Merrill <jason@yorick.cygnus.com>
......
...@@ -85,12 +85,12 @@ ...@@ -85,12 +85,12 @@
2003-12-22 Andrew Pinski <pinskia@physics.uc.edu> 2003-12-22 Andrew Pinski <pinskia@physics.uc.edu>
PR c++/5050 PR c++/5050
* tree.c (cp_start_inlining): Remove. * tree.c (cp_start_inlining): Remove.
(cp_end_inlining): Remove. (cp_end_inlining): Remove.
* cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Do not define. * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Do not define.
(LANG_HOOKS_TREE_INLINING_END_INLINING): Do not define. (LANG_HOOKS_TREE_INLINING_END_INLINING): Do not define.
* cp-tree.h (cp_start_inlining): Do not declare. * cp-tree.h (cp_start_inlining): Do not declare.
(cp_end_inlining): Do not declare. (cp_end_inlining): Do not declare.
2003-12-22 Mark Mitchell <mark@codesourcery.com> 2003-12-22 Mark Mitchell <mark@codesourcery.com>
...@@ -304,7 +304,7 @@ ...@@ -304,7 +304,7 @@
* decl.c (xref_basetypes): Check java class inheritance. * decl.c (xref_basetypes): Check java class inheritance.
* decl2.c (check_java_method): Skip artificial params. * decl2.c (check_java_method): Skip artificial params.
PR c++/13241 PR c++/13241
C++ ABI change. Mangling of symbols in expressions. C++ ABI change. Mangling of symbols in expressions.
* mangle.c (write_mangled_name): Add top_level flag. Rework for * mangle.c (write_mangled_name): Add top_level flag. Rework for
nested and unnested mangling. Deal with abi version 1 and version nested and unnested mangling. Deal with abi version 1 and version
...@@ -514,8 +514,8 @@ ...@@ -514,8 +514,8 @@
2003-12-02 Richard Henderson <rth@redhat.com> 2003-12-02 Richard Henderson <rth@redhat.com>
* name-lookup.h (struct cp_binding_level): Use ENUM_BITFIELD. * name-lookup.h (struct cp_binding_level): Use ENUM_BITFIELD.
* parser.c (struct cp_token): Likewise. * parser.c (struct cp_token): Likewise.
(struct cp_parser_token_tree_map_node): Likewise. (struct cp_parser_token_tree_map_node): Likewise.
* lex.c (struct resword): Move const after ENUM_BITFIELD. * lex.c (struct resword): Move const after ENUM_BITFIELD.
2003-11-30 Mark Mitchell <mark@codesourcery.com> 2003-11-30 Mark Mitchell <mark@codesourcery.com>
...@@ -630,11 +630,11 @@ ...@@ -630,11 +630,11 @@
2003-11-14 Giovanni Bajo <giovannibajo@libero.it> 2003-11-14 Giovanni Bajo <giovannibajo@libero.it>
PR c++/2294 PR c++/2294
* name-lookup.c (push_overloaded_decl): Always construct an OVERLOAD * name-lookup.c (push_overloaded_decl): Always construct an OVERLOAD
unless the declaration is a built-in. unless the declaration is a built-in.
(set_namespace_binding): While binding OVERLOADs with only one (set_namespace_binding): While binding OVERLOADs with only one
declaration, we still need to call supplement_binding. declaration, we still need to call supplement_binding.
2003-11-14 Mark Mitchell <mark@codesourcery.com> 2003-11-14 Mark Mitchell <mark@codesourcery.com>
...@@ -647,9 +647,9 @@ ...@@ -647,9 +647,9 @@
2003-11-14 Giovanni Bajo <giovannibajo@libero.it> 2003-11-14 Giovanni Bajo <giovannibajo@libero.it>
PR c++/2094 PR c++/2094
* pt.c (unify): Add support for PTRMEM_CST and * pt.c (unify): Add support for PTRMEM_CST and
FIELD_DECL unification. FIELD_DECL unification.
2003-11-13 Richard Earnshaw <rearnsha@arm.com> 2003-11-13 Richard Earnshaw <rearnsha@arm.com>
...@@ -801,7 +801,7 @@ ...@@ -801,7 +801,7 @@
2003-10-21 Robert Bowdidge <bowdidge@apple.com> 2003-10-21 Robert Bowdidge <bowdidge@apple.com>
* decl.c (cp_finish_decl): Remove clause intended for asm directives * decl.c (cp_finish_decl): Remove clause intended for asm directives
in struct or class fields: this code is never executed. in struct or class fields: this code is never executed.
2003-10-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 2003-10-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
...@@ -1194,7 +1194,7 @@ ...@@ -1194,7 +1194,7 @@
2003-09-27 Gabriel Dos Reis <gdr@integrable-solutions.net> 2003-09-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
* cp-tree.h, name-lookup.h, decl.c, decl2.c: Remove reference to * cp-tree.h, name-lookup.h, decl.c, decl2.c: Remove reference to
macros BINDING_SCOPE, BINDING_VALUE and BINDING_TYPE. macros BINDING_SCOPE, BINDING_VALUE and BINDING_TYPE.
2003-09-26 Gabriel Dos Reis <gdr@integrable-solutions.net> 2003-09-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
...@@ -1344,7 +1344,7 @@ ...@@ -1344,7 +1344,7 @@
2003-09-17 Richard Henderson <rth@redhat.com> 2003-09-17 Richard Henderson <rth@redhat.com>
PR c++/12316 PR c++/12316
* semantics.c (expand_or_defer_fn): Inc/dec function_depth. * semantics.c (expand_or_defer_fn): Inc/dec function_depth.
2003-09-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 2003-09-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
......
...@@ -4631,7 +4631,7 @@ ...@@ -4631,7 +4631,7 @@
(cp_parser_direct_declarator): Likewise. (cp_parser_direct_declarator): Likewise.
* pt.c (tsubst): Likewise. * pt.c (tsubst): Likewise.
(tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
for COMPONENT_REF. for COMPONENT_REF.
* semantics.c (finish_non_static_data_member): Add new operand * semantics.c (finish_non_static_data_member): Add new operand
for COMPONENT_REF. for COMPONENT_REF.
* typeck.c (build_class_member_access_expr): Likewise. * typeck.c (build_class_member_access_expr): Likewise.
......
...@@ -261,8 +261,8 @@ ...@@ -261,8 +261,8 @@
2003-09-03 Richard Henderson <rth@redhat.com> 2003-09-03 Richard Henderson <rth@redhat.com>
* decl.c (finish_function): Fix misapplied patch. Don't * decl.c (finish_function): Fix misapplied patch. Don't
free_after_parsing or free_after_compilation. For real this time. free_after_parsing or free_after_compilation. For real this time.
2003-08-22 Jason Merrill <jason@redhat.com> 2003-08-22 Jason Merrill <jason@redhat.com>
...@@ -314,7 +314,7 @@ ...@@ -314,7 +314,7 @@
2003-06-05 Frank Ch. Eigler <fche@redhat.com> 2003-06-05 Frank Ch. Eigler <fche@redhat.com>
* cp-mudflap.c (mx_flag): Remove. Update callers to use mf_mark. * cp-mudflap.c (mx_flag): Remove. Update callers to use mf_mark.
2003-05-24 Diego Novillo <dnovillo@redhat.com> 2003-05-24 Diego Novillo <dnovillo@redhat.com>
......
...@@ -164,7 +164,7 @@ c++.install-common: installdirs ...@@ -164,7 +164,7 @@ c++.install-common: installdirs
$(INSTALL_PROGRAM) g++-cross$(exeext) $(DESTDIR)$(gcc_tooldir)/bin/g++$(exeext); \ $(INSTALL_PROGRAM) g++-cross$(exeext) $(DESTDIR)$(gcc_tooldir)/bin/g++$(exeext); \
rm -f $(DESTDIR)$(gcc_tooldir)/bin/c++$(exeext); \ rm -f $(DESTDIR)$(gcc_tooldir)/bin/c++$(exeext); \
( cd $(DESTDIR)$(gcc_tooldir)/bin && \ ( cd $(DESTDIR)$(gcc_tooldir)/bin && \
$(LN) g++$(exeext) c++$(exeext) ); \ $(LN) g++$(exeext) c++$(exeext) ); \
else true; fi; \ else true; fi; \
else \ else \
rm -f $(DESTDIR)$(bindir)/$(GXX_TARGET_INSTALL_NAME)$(exeext); \ rm -f $(DESTDIR)$(bindir)/$(GXX_TARGET_INSTALL_NAME)$(exeext); \
......
...@@ -250,7 +250,7 @@ ...@@ -250,7 +250,7 @@
but not all, the compiler will tell you where you need to add but not all, the compiler will tell you where you need to add
'typename'. For more information, see 'typename'. For more information, see
http://www.cygnus.com/misc/wp/dec96pub/template.html#temp.res http://www.cygnus.com/misc/wp/dec96pub/template.html#temp.res
+ Guiding declarations are no longer supported. Function declarations, + Guiding declarations are no longer supported. Function declarations,
including friend declarations, do not refer to template instantiations. including friend declarations, do not refer to template instantiations.
...@@ -269,7 +269,7 @@ ...@@ -269,7 +269,7 @@
+ Explicit instantiation of template constructors and destructors is + Explicit instantiation of template constructors and destructors is
now supported. For instance: now supported. For instance:
template A<int>::A(const A&); template A<int>::A(const A&);
Still not supported: Still not supported:
...@@ -324,9 +324,9 @@ ...@@ -324,9 +324,9 @@
signatures are overridden) as it did before. signatures are overridden) as it did before.
+ -Wall no longer implies -W. The new warning flag, -Wsign-compare, + -Wall no longer implies -W. The new warning flag, -Wsign-compare,
included in -Wall, warns about dangerous comparisons of signed and included in -Wall, warns about dangerous comparisons of signed and
unsigned values. Only the flag is new; it was previously part of unsigned values. Only the flag is new; it was previously part of
-W. -W.
+ The new flag, -fno-weak, disables the use of weak symbols. + The new flag, -fno-weak, disables the use of weak symbols.
...@@ -377,12 +377,12 @@ ...@@ -377,12 +377,12 @@
supported. For instance: supported. For instance:
struct A { struct A {
struct B; struct B;
B* bp; B* bp;
}; };
struct A::B { struct A::B {
int member; int member;
}; };
* On the HPPA, some classes that do not define a copy constructor * On the HPPA, some classes that do not define a copy constructor
......
...@@ -409,7 +409,7 @@ cp_gimplify_init_expr (tree *expr_p, tree *pre_p, tree *post_p) ...@@ -409,7 +409,7 @@ cp_gimplify_init_expr (tree *expr_p, tree *pre_p, tree *post_p)
*expr_p = from; *expr_p = from;
/* The initialization is now a side-effect, so the container can /* The initialization is now a side-effect, so the container can
become void. */ become void. */
if (from != sub) if (from != sub)
TREE_TYPE (from) = void_type_node; TREE_TYPE (from) = void_type_node;
} }
......
...@@ -89,15 +89,15 @@ cp_expr_size (tree exp) ...@@ -89,15 +89,15 @@ cp_expr_size (tree exp)
/* And, the gimplifier will sometimes make a copy of /* And, the gimplifier will sometimes make a copy of
an aggregate. In particular, for a case like: an aggregate. In particular, for a case like:
struct S { S(); }; struct S { S(); };
struct X { int a; S s; }; struct X { int a; S s; };
X x = { 0 }; X x = { 0 };
the gimplifier will create a temporary with the gimplifier will create a temporary with
static storage duration, perform static static storage duration, perform static
initialization of the temporary, and then copy initialization of the temporary, and then copy
the result. Since the "s" subobject is never the result. Since the "s" subobject is never
constructed, this is a valid transformation. */ constructed, this is a valid transformation. */
|| CP_AGGREGATE_TYPE_P (type)); || CP_AGGREGATE_TYPE_P (type));
/* This would be wrong for a type with virtual bases, but they are /* This would be wrong for a type with virtual bases, but they are
...@@ -118,9 +118,9 @@ cp_tree_size (enum tree_code code) ...@@ -118,9 +118,9 @@ cp_tree_size (enum tree_code code)
switch (code) switch (code)
{ {
case TINST_LEVEL: return sizeof (struct tinst_level_s); case TINST_LEVEL: return sizeof (struct tinst_level_s);
case PTRMEM_CST: return sizeof (struct ptrmem_cst); case PTRMEM_CST: return sizeof (struct ptrmem_cst);
case BASELINK: return sizeof (struct tree_baselink); case BASELINK: return sizeof (struct tree_baselink);
case TEMPLATE_PARM_INDEX: return sizeof (template_parm_index); case TEMPLATE_PARM_INDEX: return sizeof (template_parm_index);
case DEFAULT_ARG: return sizeof (struct tree_default_arg); case DEFAULT_ARG: return sizeof (struct tree_default_arg);
case OVERLOAD: return sizeof (struct tree_overload); case OVERLOAD: return sizeof (struct tree_overload);
default: default:
......
...@@ -108,17 +108,17 @@ DEFTREECODE (BASELINK, "baselink", tcc_exceptional, 0) ...@@ -108,17 +108,17 @@ DEFTREECODE (BASELINK, "baselink", tcc_exceptional, 0)
/* Template definition. The following fields have the specified uses, /* Template definition. The following fields have the specified uses,
although there are other macros in cp-tree.h that should be used for although there are other macros in cp-tree.h that should be used for
accessing this data. accessing this data.
DECL_ARGUMENTS template parm vector DECL_ARGUMENTS template parm vector
DECL_TEMPLATE_INFO template text &c DECL_TEMPLATE_INFO template text &c
DECL_VINDEX list of instantiations already produced; DECL_VINDEX list of instantiations already produced;
only done for functions so far only done for functions so far
For class template: For class template:
DECL_INITIAL associated templates (methods &c) DECL_INITIAL associated templates (methods &c)
DECL_TEMPLATE_RESULT null DECL_TEMPLATE_RESULT null
For non-class templates: For non-class templates:
TREE_TYPE type of object to be constructed TREE_TYPE type of object to be constructed
DECL_TEMPLATE_RESULT decl for object to be created DECL_TEMPLATE_RESULT decl for object to be created
(e.g., FUNCTION_DECL with tmpl parms used) (e.g., FUNCTION_DECL with tmpl parms used)
*/ */
DEFTREECODE (TEMPLATE_DECL, "template_decl", tcc_declaration, 0) DEFTREECODE (TEMPLATE_DECL, "template_decl", tcc_declaration, 0)
...@@ -132,7 +132,7 @@ DEFTREECODE (TEMPLATE_DECL, "template_decl", tcc_declaration, 0) ...@@ -132,7 +132,7 @@ DEFTREECODE (TEMPLATE_DECL, "template_decl", tcc_declaration, 0)
struct S struct S
{ {
template <class U, // Index 0, Level 2. template <class U, // Index 0, Level 2.
class V> // Index 1, Level 2. class V> // Index 1, Level 2.
void f(); void f();
}; };
...@@ -148,7 +148,7 @@ DEFTREECODE (TEMPLATE_DECL, "template_decl", tcc_declaration, 0) ...@@ -148,7 +148,7 @@ DEFTREECODE (TEMPLATE_DECL, "template_decl", tcc_declaration, 0)
struct S<int> struct S<int>
{ {
template <class U, // Index 0, Level 1, Orig Level 2 template <class U, // Index 0, Level 1, Orig Level 2
class V> // Index 1, Level 1, Orig Level 2 class V> // Index 1, Level 1, Orig Level 2
void f(); void f();
}; };
......
...@@ -44,21 +44,21 @@ typedef struct ...@@ -44,21 +44,21 @@ typedef struct
#define pp_cxx_cv_qualifier_seq(PP, T) \ #define pp_cxx_cv_qualifier_seq(PP, T) \
pp_c_type_qualifier_list (pp_c_base (PP), T) pp_c_type_qualifier_list (pp_c_base (PP), T)
#define pp_cxx_whitespace(PP) pp_c_whitespace (pp_c_base (PP)) #define pp_cxx_whitespace(PP) pp_c_whitespace (pp_c_base (PP))
#define pp_cxx_left_paren(PP) pp_c_left_paren (pp_c_base (PP)) #define pp_cxx_left_paren(PP) pp_c_left_paren (pp_c_base (PP))
#define pp_cxx_right_paren(PP) pp_c_right_paren (pp_c_base (PP)) #define pp_cxx_right_paren(PP) pp_c_right_paren (pp_c_base (PP))
#define pp_cxx_left_brace(PP) pp_c_left_brace (pp_c_base (PP)) #define pp_cxx_left_brace(PP) pp_c_left_brace (pp_c_base (PP))
#define pp_cxx_right_brace(PP) pp_c_right_brace (pp_c_base (PP)) #define pp_cxx_right_brace(PP) pp_c_right_brace (pp_c_base (PP))
#define pp_cxx_left_bracket(PP) pp_c_left_bracket (pp_c_base (PP)) #define pp_cxx_left_bracket(PP) pp_c_left_bracket (pp_c_base (PP))
#define pp_cxx_right_bracket(PP) pp_c_right_bracket (pp_c_base (PP)) #define pp_cxx_right_bracket(PP) pp_c_right_bracket (pp_c_base (PP))
#define pp_cxx_dot(PP) pp_c_dot (pp_c_base (PP)) #define pp_cxx_dot(PP) pp_c_dot (pp_c_base (PP))
#define pp_cxx_ampersand(PP) pp_c_ampersand (pp_c_base (PP)) #define pp_cxx_ampersand(PP) pp_c_ampersand (pp_c_base (PP))
#define pp_cxx_star(PP) pp_c_star (pp_c_base (PP)) #define pp_cxx_star(PP) pp_c_star (pp_c_base (PP))
#define pp_cxx_arrow(PP) pp_c_arrow (pp_c_base (PP)) #define pp_cxx_arrow(PP) pp_c_arrow (pp_c_base (PP))
#define pp_cxx_semicolon(PP) pp_c_semicolon (pp_c_base (PP)) #define pp_cxx_semicolon(PP) pp_c_semicolon (pp_c_base (PP))
#define pp_cxx_complement(PP) pp_c_complement (pp_c_base (PP)) #define pp_cxx_complement(PP) pp_c_complement (pp_c_base (PP))
#define pp_cxx_identifier(PP, I) pp_c_identifier (pp_c_base (PP), I) #define pp_cxx_identifier(PP, I) pp_c_identifier (pp_c_base (PP), I)
#define pp_cxx_tree_identifier(PP, T) \ #define pp_cxx_tree_identifier(PP, T) \
pp_c_tree_identifier (pp_c_base (PP), T) pp_c_tree_identifier (pp_c_base (PP), T)
......
...@@ -91,63 +91,63 @@ dump_op (dump_info_p di, tree t) ...@@ -91,63 +91,63 @@ dump_op (dump_info_p di, tree t)
break; break;
case PLUS_EXPR: case PLUS_EXPR:
if (DECL_ASSIGNMENT_OPERATOR_P (t)) if (DECL_ASSIGNMENT_OPERATOR_P (t))
dump_string (di, "plusassign"); dump_string (di, "plusassign");
else else
dump_string(di, "plus"); dump_string(di, "plus");
break; break;
case MINUS_EXPR: case MINUS_EXPR:
if (DECL_ASSIGNMENT_OPERATOR_P (t)) if (DECL_ASSIGNMENT_OPERATOR_P (t))
dump_string (di, "minusassign"); dump_string (di, "minusassign");
else else
dump_string(di, "minus"); dump_string(di, "minus");
break; break;
case MULT_EXPR: case MULT_EXPR:
if (DECL_ASSIGNMENT_OPERATOR_P (t)) if (DECL_ASSIGNMENT_OPERATOR_P (t))
dump_string (di, "multassign"); dump_string (di, "multassign");
else else
dump_string (di, "mult"); dump_string (di, "mult");
break; break;
case TRUNC_DIV_EXPR: case TRUNC_DIV_EXPR:
if (DECL_ASSIGNMENT_OPERATOR_P (t)) if (DECL_ASSIGNMENT_OPERATOR_P (t))
dump_string (di, "divassign"); dump_string (di, "divassign");
else else
dump_string (di, "div"); dump_string (di, "div");
break; break;
case TRUNC_MOD_EXPR: case TRUNC_MOD_EXPR:
if (DECL_ASSIGNMENT_OPERATOR_P (t)) if (DECL_ASSIGNMENT_OPERATOR_P (t))
dump_string (di, "modassign"); dump_string (di, "modassign");
else else
dump_string (di, "mod"); dump_string (di, "mod");
break; break;
case BIT_AND_EXPR: case BIT_AND_EXPR:
if (DECL_ASSIGNMENT_OPERATOR_P (t)) if (DECL_ASSIGNMENT_OPERATOR_P (t))
dump_string (di, "andassign"); dump_string (di, "andassign");
else else
dump_string (di, "and"); dump_string (di, "and");
break; break;
case BIT_IOR_EXPR: case BIT_IOR_EXPR:
if (DECL_ASSIGNMENT_OPERATOR_P (t)) if (DECL_ASSIGNMENT_OPERATOR_P (t))
dump_string (di, "orassign"); dump_string (di, "orassign");
else else
dump_string (di, "or"); dump_string (di, "or");
break; break;
case BIT_XOR_EXPR: case BIT_XOR_EXPR:
if (DECL_ASSIGNMENT_OPERATOR_P (t)) if (DECL_ASSIGNMENT_OPERATOR_P (t))
dump_string (di, "xorassign"); dump_string (di, "xorassign");
else else
dump_string (di, "xor"); dump_string (di, "xor");
break; break;
case LSHIFT_EXPR: case LSHIFT_EXPR:
if (DECL_ASSIGNMENT_OPERATOR_P (t)) if (DECL_ASSIGNMENT_OPERATOR_P (t))
dump_string (di, "lshiftassign"); dump_string (di, "lshiftassign");
else else
dump_string (di, "lshift"); dump_string (di, "lshift");
break; break;
case RSHIFT_EXPR: case RSHIFT_EXPR:
if (DECL_ASSIGNMENT_OPERATOR_P (t)) if (DECL_ASSIGNMENT_OPERATOR_P (t))
dump_string (di, "rshiftassign"); dump_string (di, "rshiftassign");
else else
dump_string (di, "rshift"); dump_string (di, "rshift");
break; break;
case EQ_EXPR: case EQ_EXPR:
dump_string (di, "eq"); dump_string (di, "eq");
...@@ -196,7 +196,7 @@ dump_op (dump_info_p di, tree t) ...@@ -196,7 +196,7 @@ dump_op (dump_info_p di, tree t)
break; break;
case NOP_EXPR: case NOP_EXPR:
if (DECL_ASSIGNMENT_OPERATOR_P (t)) if (DECL_ASSIGNMENT_OPERATOR_P (t))
dump_string (di, "assign"); dump_string (di, "assign");
break; break;
default: default:
break; break;
...@@ -263,7 +263,7 @@ cp_dump_tree (void* dump_info, tree t) ...@@ -263,7 +263,7 @@ cp_dump_tree (void* dump_info, tree t)
dump_child ("vfld", TYPE_VFIELD (t)); dump_child ("vfld", TYPE_VFIELD (t));
if (CLASSTYPE_TEMPLATE_SPECIALIZATION(t)) if (CLASSTYPE_TEMPLATE_SPECIALIZATION(t))
dump_string(di, "spec"); dump_string(di, "spec");
if (!dump_flag (di, TDF_SLIM, t) && TYPE_BINFO (t)) if (!dump_flag (di, TDF_SLIM, t) && TYPE_BINFO (t))
{ {
...@@ -285,32 +285,32 @@ cp_dump_tree (void* dump_info, tree t) ...@@ -285,32 +285,32 @@ cp_dump_tree (void* dump_info, tree t)
case FIELD_DECL: case FIELD_DECL:
dump_access (di, t); dump_access (di, t);
if (DECL_MUTABLE_P (t)) if (DECL_MUTABLE_P (t))
dump_string(di, "mutable"); dump_string(di, "mutable");
break; break;
case VAR_DECL: case VAR_DECL:
if (TREE_CODE (CP_DECL_CONTEXT (t)) == RECORD_TYPE) if (TREE_CODE (CP_DECL_CONTEXT (t)) == RECORD_TYPE)
dump_access (di, t); dump_access (di, t);
if (TREE_STATIC (t) && !TREE_PUBLIC (t)) if (TREE_STATIC (t) && !TREE_PUBLIC (t))
dump_string (di, "static"); dump_string (di, "static");
break; break;
case FUNCTION_DECL: case FUNCTION_DECL:
if (!DECL_THUNK_P (t)) if (!DECL_THUNK_P (t))
{ {
if (DECL_OVERLOADED_OPERATOR_P (t)) { if (DECL_OVERLOADED_OPERATOR_P (t)) {
dump_string (di, "operator"); dump_string (di, "operator");
dump_op (di, t); dump_op (di, t);
} }
if (DECL_FUNCTION_MEMBER_P (t)) if (DECL_FUNCTION_MEMBER_P (t))
{ {
dump_string (di, "member"); dump_string (di, "member");
dump_access (di, t); dump_access (di, t);
} }
if (DECL_PURE_VIRTUAL_P (t)) if (DECL_PURE_VIRTUAL_P (t))
dump_string (di, "pure"); dump_string (di, "pure");
if (DECL_VIRTUAL_P (t)) if (DECL_VIRTUAL_P (t))
dump_string (di, "virtual"); dump_string (di, "virtual");
if (DECL_CONSTRUCTOR_P (t)) if (DECL_CONSTRUCTOR_P (t))
dump_string (di, "constructor"); dump_string (di, "constructor");
if (DECL_DESTRUCTOR_P (t)) if (DECL_DESTRUCTOR_P (t))
......
...@@ -260,7 +260,7 @@ decl_is_java_type (tree decl, int err) ...@@ -260,7 +260,7 @@ decl_is_java_type (tree decl, int err)
{ {
/* Can't throw a reference. */ /* Can't throw a reference. */
error ("type %qT is disallowed in Java %<throw%> or %<catch%>", error ("type %qT is disallowed in Java %<throw%> or %<catch%>",
decl); decl);
} }
if (r) if (r)
...@@ -278,7 +278,7 @@ decl_is_java_type (tree decl, int err) ...@@ -278,7 +278,7 @@ decl_is_java_type (tree decl, int err)
{ {
/* Thrown object must be a Throwable. */ /* Thrown object must be a Throwable. */
error ("type %qT is not derived from %<java::lang::Throwable%>", error ("type %qT is not derived from %<java::lang::Throwable%>",
TREE_TYPE (decl)); TREE_TYPE (decl));
} }
} }
} }
...@@ -557,7 +557,7 @@ do_free_exception (tree ptr) ...@@ -557,7 +557,7 @@ do_free_exception (tree ptr)
static tree static tree
wrap_cleanups_r (tree *tp, int *walk_subtrees ATTRIBUTE_UNUSED, wrap_cleanups_r (tree *tp, int *walk_subtrees ATTRIBUTE_UNUSED,
void *data ATTRIBUTE_UNUSED) void *data ATTRIBUTE_UNUSED)
{ {
tree exp = *tp; tree exp = *tp;
tree cleanup; tree cleanup;
...@@ -604,7 +604,7 @@ build_throw (tree exp) ...@@ -604,7 +604,7 @@ build_throw (tree exp)
if (exp != NULL_TREE) if (exp != NULL_TREE)
{ {
if (!is_admissible_throw_operand (exp)) if (!is_admissible_throw_operand (exp))
return error_mark_node; return error_mark_node;
} }
if (! doing_eh (1)) if (! doing_eh (1))
...@@ -710,10 +710,10 @@ build_throw (tree exp) ...@@ -710,10 +710,10 @@ build_throw (tree exp)
BUT: Issue 475 may do away with this inconsistency by removing the BUT: Issue 475 may do away with this inconsistency by removing the
terminate() in this situation. terminate() in this situation.
Note that we don't check the return value from stabilize_init Note that we don't check the return value from stabilize_init
because it will only return false in cases where elided is true, because it will only return false in cases where elided is true,
and therefore we don't need to work around the failure to and therefore we don't need to work around the failure to
preevaluate. */ preevaluate. */
temp_expr = NULL_TREE; temp_expr = NULL_TREE;
stabilize_init (exp, &temp_expr); stabilize_init (exp, &temp_expr);
...@@ -805,9 +805,9 @@ complete_ptr_ref_or_void_ptr_p (tree type, tree from) ...@@ -805,9 +805,9 @@ complete_ptr_ref_or_void_ptr_p (tree type, tree from)
tree core = TREE_TYPE (type); tree core = TREE_TYPE (type);
if (is_ptr && VOID_TYPE_P (core)) if (is_ptr && VOID_TYPE_P (core))
/* OK */; /* OK */;
else if (!complete_type_or_else (core, from)) else if (!complete_type_or_else (core, from))
return 0; return 0;
} }
return 1; return 1;
} }
...@@ -822,22 +822,22 @@ is_admissible_throw_operand (tree expr) ...@@ -822,22 +822,22 @@ is_admissible_throw_operand (tree expr)
tree type = TREE_TYPE (expr); tree type = TREE_TYPE (expr);
/* 15.1/4 [...] The type of the throw-expression shall not be an /* 15.1/4 [...] The type of the throw-expression shall not be an
incomplete type, or a pointer or a reference to an incomplete incomplete type, or a pointer or a reference to an incomplete
type, other than void*, const void*, volatile void*, or type, other than void*, const void*, volatile void*, or
const volatile void*. Except for these restriction and the const volatile void*. Except for these restriction and the
restrictions on type matching mentioned in 15.3, the operand restrictions on type matching mentioned in 15.3, the operand
of throw is treated exactly as a function argument in a call of throw is treated exactly as a function argument in a call
(5.2.2) or the operand of a return statement. */ (5.2.2) or the operand of a return statement. */
if (!complete_ptr_ref_or_void_ptr_p (type, expr)) if (!complete_ptr_ref_or_void_ptr_p (type, expr))
return false; return false;
/* 10.4/3 An abstract class shall not be used as a parameter type, /* 10.4/3 An abstract class shall not be used as a parameter type,
as a function return type or as type of an explicit as a function return type or as type of an explicit
conversion. */ conversion. */
else if (CLASS_TYPE_P (type) && CLASSTYPE_PURE_VIRTUALS (type)) else if (CLASS_TYPE_P (type) && CLASSTYPE_PURE_VIRTUALS (type))
{ {
error ("expression %qE of abstract class type %qT cannot " error ("expression %qE of abstract class type %qT cannot "
"be used in throw-expression", expr, type); "be used in throw-expression", expr, type);
return false; return false;
} }
...@@ -926,7 +926,7 @@ check_handlers_1 (tree master, tree_stmt_iterator i) ...@@ -926,7 +926,7 @@ check_handlers_1 (tree master, tree_stmt_iterator i)
warning (0, "%H by earlier handler for %qT", warning (0, "%H by earlier handler for %qT",
EXPR_LOCUS (master), type); EXPR_LOCUS (master), type);
break; break;
} }
} }
} }
...@@ -946,7 +946,7 @@ check_handlers (tree handlers) ...@@ -946,7 +946,7 @@ check_handlers (tree handlers)
if (!tsi_end_p (i)) if (!tsi_end_p (i))
while (1) while (1)
{ {
tree handler = tsi_stmt (i); tree handler = tsi_stmt (i);
tsi_next (&i); tsi_next (&i);
/* No more handlers; nothing to shadow. */ /* No more handlers; nothing to shadow. */
......
...@@ -537,9 +537,9 @@ do_friend (tree ctype, tree declarator, tree decl, ...@@ -537,9 +537,9 @@ do_friend (tree ctype, tree declarator, tree 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);
...@@ -551,13 +551,13 @@ do_friend (tree ctype, tree declarator, tree decl, ...@@ -551,13 +551,13 @@ do_friend (tree ctype, tree declarator, tree decl,
{ {
static int explained; static int explained;
warning (0, "friend declaration %q#D declares a non-template " warning (0, "friend declaration %q#D declares a non-template "
"function", decl); "function", decl);
if (! explained) if (! explained)
{ {
warning (0, "(if this is not what you intended, make sure " warning (0, "(if this is not what you intended, make sure "
"the function template has already been declared " "the function template has already been declared "
"and add <> after the function name here) " "and add <> after the function name here) "
"-Wno-non-template-friend disables this warning"); "-Wno-non-template-friend disables this warning");
explained = 1; explained = 1;
} }
} }
......
...@@ -156,16 +156,16 @@ build_zero_init (tree type, tree nelts, bool static_storage_p) ...@@ -156,16 +156,16 @@ build_zero_init (tree type, tree nelts, bool static_storage_p)
To zero-initialization storage for an object of type T means: To zero-initialization storage for an object of type T means:
-- if T is a scalar type, the storage is set to the value of zero -- if T is a scalar type, the storage is set to the value of zero
converted to T. converted to T.
-- if T is a non-union class type, the storage for each nonstatic -- if T is a non-union class type, the storage for each nonstatic
data member and each base-class subobject is zero-initialized. data member and each base-class subobject is zero-initialized.
-- if T is a union type, the storage for its first data member is -- if T is a union type, the storage for its first data member is
zero-initialized. zero-initialized.
-- if T is an array type, the storage for each element is -- if T is an array type, the storage for each element is
zero-initialized. zero-initialized.
-- if T is a reference type, no initialization is performed. */ -- if T is a reference type, no initialization is performed. */
...@@ -518,7 +518,7 @@ sort_mem_initializers (tree t, tree mem_inits) ...@@ -518,7 +518,7 @@ sort_mem_initializers (tree t, tree mem_inits)
/* Issue a warning if the explicit initializer order does not /* Issue a warning if the explicit initializer order does not
match that which will actually occur. match that which will actually occur.
??? Are all these on the correct lines? */ ??? Are all these on the correct lines? */
if (warn_reorder && !subobject_init) if (warn_reorder && !subobject_init)
{ {
if (TREE_CODE (TREE_PURPOSE (next_subobject)) == FIELD_DECL) if (TREE_CODE (TREE_PURPOSE (next_subobject)) == FIELD_DECL)
...@@ -1004,7 +1004,7 @@ expand_member_init (tree name) ...@@ -1004,7 +1004,7 @@ expand_member_init (tree name)
/* [class.base.init] /* [class.base.init]
If a mem-initializer-id is ambiguous because it designates If a mem-initializer-id is ambiguous because it designates
both a direct non-virtual base class and an inherited virtual both a direct non-virtual base class and an inherited virtual
base class, the mem-initializer is ill-formed. */ base class, the mem-initializer is ill-formed. */
if (direct_binfo && virtual_binfo) if (direct_binfo && virtual_binfo)
...@@ -1372,9 +1372,9 @@ build_offset_ref (tree type, tree name, bool address_p) ...@@ -1372,9 +1372,9 @@ build_offset_ref (tree type, tree name, bool address_p)
{ {
tree t = lookup_namespace_name (type, name); tree t = lookup_namespace_name (type, name);
if (t == error_mark_node) if (t == error_mark_node)
return t; return t;
if (TREE_CODE (orig_name) == TEMPLATE_ID_EXPR) if (TREE_CODE (orig_name) == TEMPLATE_ID_EXPR)
/* Reconstruct the TEMPLATE_ID_EXPR. */ /* Reconstruct the TEMPLATE_ID_EXPR. */
t = build2 (TEMPLATE_ID_EXPR, TREE_TYPE (t), t = build2 (TEMPLATE_ID_EXPR, TREE_TYPE (t),
t, TREE_OPERAND (orig_name, 1)); t, TREE_OPERAND (orig_name, 1));
if (! type_unknown_p (t)) if (! type_unknown_p (t))
...@@ -1462,11 +1462,11 @@ build_offset_ref (tree type, tree name, bool address_p) ...@@ -1462,11 +1462,11 @@ build_offset_ref (tree type, tree name, bool address_p)
expects to encounter OVERLOADs, not raw functions. */ expects to encounter OVERLOADs, not raw functions. */
t = ovl_cons (t, NULL_TREE); t = ovl_cons (t, NULL_TREE);
t = build2 (TEMPLATE_ID_EXPR, TREE_TYPE (t), t, t = build2 (TEMPLATE_ID_EXPR, TREE_TYPE (t), t,
TREE_OPERAND (orig_name, 1)); TREE_OPERAND (orig_name, 1));
t = build2 (OFFSET_REF, unknown_type_node, decl, t); t = build2 (OFFSET_REF, unknown_type_node, decl, t);
PTRMEM_OK_P (t) = 1; PTRMEM_OK_P (t) = 1;
return t; return t;
} }
...@@ -1588,13 +1588,13 @@ decl_constant_value (tree decl) ...@@ -1588,13 +1588,13 @@ decl_constant_value (tree decl)
if ((TREE_CODE (decl) == CONST_DECL if ((TREE_CODE (decl) == CONST_DECL
|| (TREE_CODE (decl) == VAR_DECL || (TREE_CODE (decl) == VAR_DECL
/* And so are variables with a 'const' type -- unless they /* And so are variables with a 'const' type -- unless they
are also 'volatile'. */ are also 'volatile'. */
&& CP_TYPE_CONST_NON_VOLATILE_P (TREE_TYPE (decl)))) && CP_TYPE_CONST_NON_VOLATILE_P (TREE_TYPE (decl))))
&& DECL_INITIAL (decl) && DECL_INITIAL (decl)
&& DECL_INITIAL (decl) != error_mark_node && DECL_INITIAL (decl) != error_mark_node
/* This is invalid if initial value is not constant. If it has /* This is invalid if initial value is not constant. If it has
either a function call, a memory reference, or a variable, either a function call, a memory reference, or a variable,
then re-evaluating it could give different results. */ then re-evaluating it could give different results. */
&& TREE_CONSTANT (DECL_INITIAL (decl))) && TREE_CONSTANT (DECL_INITIAL (decl)))
return DECL_INITIAL (decl); return DECL_INITIAL (decl);
...@@ -2446,7 +2446,7 @@ build_vec_init (tree base, tree maxindex, tree init, int from_array) ...@@ -2446,7 +2446,7 @@ build_vec_init (tree base, tree maxindex, tree init, int from_array)
++t1; ++t1;
} }
} catch (...) { } catch (...) {
... destroy elements that were constructed ... ... destroy elements that were constructed ...
} }
rval; rval;
}) })
......
...@@ -43,7 +43,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -43,7 +43,7 @@ Boston, MA 02111-1307, USA. */
cc1plus %{save-temps|no-integrated-cpp:-fpreprocessed %{save-temps:%b.ii} %{!save-temps:%g.ii}}\ cc1plus %{save-temps|no-integrated-cpp:-fpreprocessed %{save-temps:%b.ii} %{!save-temps:%g.ii}}\
%{!save-temps:%{!no-integrated-cpp:%(cpp_unique_options)}}\ %{!save-temps:%{!no-integrated-cpp:%(cpp_unique_options)}}\
%(cc1_options) %2 %{+e1*}\ %(cc1_options) %2 %{+e1*}\
-o %g.s %{!o*:--output-pch=%i.gch} %W{o*:--output-pch=%*}%V}}}", -o %g.s %{!o*:--output-pch=%i.gch} %W{o*:--output-pch=%*}%V}}}",
CPLUSPLUS_CPP_SPEC, 0, 0}, CPLUSPLUS_CPP_SPEC, 0, 0},
{"@c++", {"@c++",
"%{E|M|MM:cc1plus -E %(cpp_options) %2 %(cpp_debug_options)}\ "%{E|M|MM:cc1plus -E %(cpp_options) %2 %(cpp_debug_options)}\
......
...@@ -117,7 +117,7 @@ init_operators (void) ...@@ -117,7 +117,7 @@ init_operators (void)
: &operator_name_info[(int) CODE]); \ : &operator_name_info[(int) CODE]); \
oni->identifier = identifier; \ oni->identifier = identifier; \
oni->name = NAME; \ oni->name = NAME; \
oni->mangled_name = MANGLING; \ oni->mangled_name = MANGLING; \
oni->arity = ARITY; oni->arity = ARITY;
#include "operators.def" #include "operators.def"
...@@ -184,7 +184,7 @@ static const struct resword reswords[] = ...@@ -184,7 +184,7 @@ static const struct resword reswords[] =
{ "_Complex", RID_COMPLEX, 0 }, { "_Complex", RID_COMPLEX, 0 },
{ "__FUNCTION__", RID_FUNCTION_NAME, 0 }, { "__FUNCTION__", RID_FUNCTION_NAME, 0 },
{ "__PRETTY_FUNCTION__", RID_PRETTY_FUNCTION_NAME, 0 }, { "__PRETTY_FUNCTION__", RID_PRETTY_FUNCTION_NAME, 0 },
{ "__alignof", RID_ALIGNOF, 0 }, { "__alignof", RID_ALIGNOF, 0 },
{ "__alignof__", RID_ALIGNOF, 0 }, { "__alignof__", RID_ALIGNOF, 0 },
{ "__asm", RID_ASM, 0 }, { "__asm", RID_ASM, 0 },
{ "__asm__", RID_ASM, 0 }, { "__asm__", RID_ASM, 0 },
...@@ -277,7 +277,7 @@ static const struct resword reswords[] = ...@@ -277,7 +277,7 @@ static const struct resword reswords[] =
{ "virtual", RID_VIRTUAL, 0 }, { "virtual", RID_VIRTUAL, 0 },
{ "void", RID_VOID, 0 }, { "void", RID_VOID, 0 },
{ "volatile", RID_VOLATILE, 0 }, { "volatile", RID_VOLATILE, 0 },
{ "wchar_t", RID_WCHAR, 0 }, { "wchar_t", RID_WCHAR, 0 },
{ "while", RID_WHILE, 0 }, { "while", RID_WHILE, 0 },
/* The remaining keywords are specific to Objective-C++. NB: /* The remaining keywords are specific to Objective-C++. NB:
...@@ -553,7 +553,7 @@ handle_pragma_implementation (cpp_reader* dfile ATTRIBUTE_UNUSED ) ...@@ -553,7 +553,7 @@ handle_pragma_implementation (cpp_reader* dfile ATTRIBUTE_UNUSED )
filename = ggc_strdup (TREE_STRING_POINTER (fname)); filename = ggc_strdup (TREE_STRING_POINTER (fname));
#if 0 #if 0
/* We currently cannot give this diagnostic, as we reach this point /* We currently cannot give this diagnostic, as we reach this point
only after cpplib has scanned the entire translation unit, so only after cpplib has scanned the entire translation unit, so
cpp_included always returns true. A plausible fix is to compare cpp_included always returns true. A plausible fix is to compare
the current source-location cookie with the first source-location the current source-location cookie with the first source-location
cookie (if any) of the filename, but this requires completing the cookie (if any) of the filename, but this requires completing the
......
...@@ -99,9 +99,9 @@ make_thunk (tree function, bool this_adjusting, ...@@ -99,9 +99,9 @@ make_thunk (tree function, bool this_adjusting,
if (this_adjusting && virtual_offset) if (this_adjusting && virtual_offset)
virtual_offset virtual_offset
= size_binop (MULT_EXPR, = size_binop (MULT_EXPR,
virtual_offset, virtual_offset,
convert (ssizetype, convert (ssizetype,
TYPE_SIZE_UNIT (vtable_entry_type))); TYPE_SIZE_UNIT (vtable_entry_type)));
d = tree_low_cst (fixed_offset, 0); d = tree_low_cst (fixed_offset, 0);
...@@ -688,14 +688,14 @@ do_build_assign_ref (tree fndecl) ...@@ -688,14 +688,14 @@ do_build_assign_ref (tree fndecl)
if (CP_TYPE_CONST_P (expr_type)) if (CP_TYPE_CONST_P (expr_type))
{ {
error ("non-static const member %q#D, can't use default " error ("non-static const member %q#D, can't use default "
"assignment operator", field); "assignment operator", field);
continue; continue;
} }
else if (TREE_CODE (expr_type) == REFERENCE_TYPE) else if (TREE_CODE (expr_type) == REFERENCE_TYPE)
{ {
error ("non-static reference member %q#D, can't use " error ("non-static reference member %q#D, can't use "
"default assignment operator", field); "default assignment operator", field);
continue; continue;
} }
...@@ -818,7 +818,7 @@ synthesize_method (tree fndecl) ...@@ -818,7 +818,7 @@ synthesize_method (tree fndecl)
static tree static tree
synthesize_exception_spec (tree type, tree (*extractor) (tree, void*), synthesize_exception_spec (tree type, tree (*extractor) (tree, void*),
void *client) void *client)
{ {
tree raises = empty_except_spec; tree raises = empty_except_spec;
tree fields = TYPE_FIELDS (type); tree fields = TYPE_FIELDS (type);
...@@ -830,11 +830,11 @@ synthesize_exception_spec (tree type, tree (*extractor) (tree, void*), ...@@ -830,11 +830,11 @@ synthesize_exception_spec (tree type, tree (*extractor) (tree, void*),
{ {
tree fn = (*extractor) (BINFO_TYPE (base_binfo), client); tree fn = (*extractor) (BINFO_TYPE (base_binfo), client);
if (fn) if (fn)
{ {
tree fn_raises = TYPE_RAISES_EXCEPTIONS (TREE_TYPE (fn)); tree fn_raises = TYPE_RAISES_EXCEPTIONS (TREE_TYPE (fn));
raises = merge_exception_specifiers (raises, fn_raises); raises = merge_exception_specifiers (raises, fn_raises);
} }
} }
for (; fields; fields = TREE_CHAIN (fields)) for (; fields; fields = TREE_CHAIN (fields))
{ {
...@@ -842,19 +842,19 @@ synthesize_exception_spec (tree type, tree (*extractor) (tree, void*), ...@@ -842,19 +842,19 @@ synthesize_exception_spec (tree type, tree (*extractor) (tree, void*),
tree fn; tree fn;
if (TREE_CODE (fields) != FIELD_DECL || DECL_ARTIFICIAL (fields)) if (TREE_CODE (fields) != FIELD_DECL || DECL_ARTIFICIAL (fields))
continue; continue;
while (TREE_CODE (type) == ARRAY_TYPE) while (TREE_CODE (type) == ARRAY_TYPE)
type = TREE_TYPE (type); type = TREE_TYPE (type);
if (TREE_CODE (type) != RECORD_TYPE) if (TREE_CODE (type) != RECORD_TYPE)
continue; continue;
fn = (*extractor) (type, client); fn = (*extractor) (type, client);
if (fn) if (fn)
{ {
tree fn_raises = TYPE_RAISES_EXCEPTIONS (TREE_TYPE (fn)); tree fn_raises = TYPE_RAISES_EXCEPTIONS (TREE_TYPE (fn));
raises = merge_exception_specifiers (raises, fn_raises); raises = merge_exception_specifiers (raises, fn_raises);
} }
} }
return raises; return raises;
} }
...@@ -888,7 +888,7 @@ locate_ctor (tree type, void *client ATTRIBUTE_UNUSED) ...@@ -888,7 +888,7 @@ locate_ctor (tree type, void *client ATTRIBUTE_UNUSED)
tree parms = TYPE_ARG_TYPES (TREE_TYPE (fn)); tree parms = TYPE_ARG_TYPES (TREE_TYPE (fn));
if (sufficient_parms_p (TREE_CHAIN (parms))) if (sufficient_parms_p (TREE_CHAIN (parms)))
return fn; return fn;
} }
return NULL_TREE; return NULL_TREE;
} }
...@@ -939,24 +939,24 @@ locate_copy (tree type, void *client_) ...@@ -939,24 +939,24 @@ locate_copy (tree type, void *client_)
parms = TREE_CHAIN (parms); parms = TREE_CHAIN (parms);
if (!parms) if (!parms)
continue; continue;
src_type = non_reference (TREE_VALUE (parms)); src_type = non_reference (TREE_VALUE (parms));
if (!same_type_ignoring_top_level_qualifiers_p (src_type, type)) if (!same_type_ignoring_top_level_qualifiers_p (src_type, type))
continue; continue;
if (!sufficient_parms_p (TREE_CHAIN (parms))) if (!sufficient_parms_p (TREE_CHAIN (parms)))
continue; continue;
quals = cp_type_quals (src_type); quals = cp_type_quals (src_type);
if (client->quals & ~quals) if (client->quals & ~quals)
continue; continue;
excess = quals & ~client->quals; excess = quals & ~client->quals;
if (!best || (excess_p && !excess)) if (!best || (excess_p && !excess))
{ {
best = fn; best = fn;
excess_p = excess; excess_p = excess;
} }
else else
/* Ambiguous */ /* Ambiguous */
return NULL_TREE; return NULL_TREE;
} }
return best; return best;
} }
...@@ -1026,19 +1026,19 @@ implicitly_declare_fn (special_function_kind kind, tree type, bool const_p) ...@@ -1026,19 +1026,19 @@ implicitly_declare_fn (special_function_kind kind, tree type, bool const_p)
data.name = NULL; data.name = NULL;
data.quals = 0; data.quals = 0;
if (kind == sfk_assignment_operator) if (kind == sfk_assignment_operator)
{ {
return_type = build_reference_type (type); return_type = build_reference_type (type);
name = ansi_assopname (NOP_EXPR); name = ansi_assopname (NOP_EXPR);
data.name = name; data.name = name;
} }
else else
name = constructor_name (type); name = constructor_name (type);
if (const_p) if (const_p)
{ {
data.quals = TYPE_QUAL_CONST; data.quals = TYPE_QUAL_CONST;
rhs_parm_type = build_qualified_type (type, TYPE_QUAL_CONST); rhs_parm_type = build_qualified_type (type, TYPE_QUAL_CONST);
} }
else else
rhs_parm_type = type; rhs_parm_type = type;
rhs_parm_type = build_reference_type (rhs_parm_type); rhs_parm_type = build_reference_type (rhs_parm_type);
......
...@@ -40,11 +40,11 @@ struct binding_entry_s GTY(()) ...@@ -40,11 +40,11 @@ struct binding_entry_s GTY(())
}; };
/* These macros indicate the initial chains count for binding_table. */ /* These macros indicate the initial chains count for binding_table. */
#define SCOPE_DEFAULT_HT_SIZE (1 << 3) #define SCOPE_DEFAULT_HT_SIZE (1 << 3)
#define CLASS_SCOPE_HT_SIZE (1 << 3) #define CLASS_SCOPE_HT_SIZE (1 << 3)
#define NAMESPACE_ORDINARY_HT_SIZE (1 << 5) #define NAMESPACE_ORDINARY_HT_SIZE (1 << 5)
#define NAMESPACE_STD_HT_SIZE (1 << 8) #define NAMESPACE_STD_HT_SIZE (1 << 8)
#define GLOBAL_SCOPE_HT_SIZE (1 << 8) #define GLOBAL_SCOPE_HT_SIZE (1 << 8)
extern void binding_table_foreach (binding_table, bt_foreach_proc, void *); extern void binding_table_foreach (binding_table, bt_foreach_proc, void *);
extern binding_entry binding_table_find (binding_table, tree); extern binding_entry binding_table_find (binding_table, tree);
...@@ -105,16 +105,16 @@ typedef enum scope_kind { ...@@ -105,16 +105,16 @@ typedef enum scope_kind {
is initialized by using "memset" to set the is initialized by using "memset" to set the
contents to zero, and the default scope kind contents to zero, and the default scope kind
is "sk_block". */ is "sk_block". */
sk_cleanup, /* A scope for (pseudo-)scope for cleanup. It is sk_cleanup, /* A scope for (pseudo-)scope for cleanup. It is
peusdo in that it is transparent to name lookup peusdo in that it is transparent to name lookup
activities. */ activities. */
sk_try, /* A try-block. */ sk_try, /* A try-block. */
sk_catch, /* A catch-block. */ sk_catch, /* A catch-block. */
sk_for, /* The scope of the variable declared in a sk_for, /* The scope of the variable declared in a
for-init-statement. */ for-init-statement. */
sk_function_parms, /* The scope containing function parameters. */ sk_function_parms, /* The scope containing function parameters. */
sk_class, /* The scope containing the members of a class. */ sk_class, /* The scope containing the members of a class. */
sk_namespace, /* The scope containing the members of a sk_namespace, /* The scope containing the members of a
namespace, including the global scope. */ namespace, including the global scope. */
sk_template_parms, /* A scope for template parameters. */ sk_template_parms, /* A scope for template parameters. */
sk_template_spec /* Like sk_template_parms, but for an explicit sk_template_spec /* Like sk_template_parms, but for an explicit
......
...@@ -82,13 +82,13 @@ static int n_contexts_saved; ...@@ -82,13 +82,13 @@ static int n_contexts_saved;
struct lookup_base_data_s struct lookup_base_data_s
{ {
tree t; /* type being searched. */ tree t; /* type being searched. */
tree base; /* The base type we're looking for. */ tree base; /* The base type we're looking for. */
tree binfo; /* Found binfo. */ tree binfo; /* Found binfo. */
bool via_virtual; /* Found via a virtual path. */ bool via_virtual; /* Found via a virtual path. */
bool ambiguous; /* Found multiply ambiguous */ bool ambiguous; /* Found multiply ambiguous */
bool repeated_base; /* Whether there are repeated bases in the bool repeated_base; /* Whether there are repeated bases in the
hierarchy. */ hierarchy. */
bool want_any; /* Whether we want any matching binfo. */ bool want_any; /* Whether we want any matching binfo. */
}; };
/* Worker function for lookup_base. See if we've found the desired /* Worker function for lookup_base. See if we've found the desired
...@@ -1084,8 +1084,8 @@ lookup_field_r (tree binfo, void *data) ...@@ -1084,8 +1084,8 @@ lookup_field_r (tree binfo, void *data)
nval = NULL_TREE; nval = NULL_TREE;
if (!nval && CLASSTYPE_NESTED_UTDS (type) != NULL) if (!nval && CLASSTYPE_NESTED_UTDS (type) != NULL)
{ {
binding_entry e = binding_table_find (CLASSTYPE_NESTED_UTDS (type), binding_entry e = binding_table_find (CLASSTYPE_NESTED_UTDS (type),
lfi->name); lfi->name);
if (e != NULL) if (e != NULL)
nval = TYPE_MAIN_DECL (e->type); nval = TYPE_MAIN_DECL (e->type);
else else
...@@ -1256,7 +1256,7 @@ lookup_member (tree xbasetype, tree name, int protect, bool want_type) ...@@ -1256,7 +1256,7 @@ lookup_member (tree xbasetype, tree name, int protect, bool want_type)
{ {
error (errstr, name, type); error (errstr, name, type);
if (lfi.ambiguous) if (lfi.ambiguous)
print_candidates (lfi.ambiguous); print_candidates (lfi.ambiguous);
rval = error_mark_node; rval = error_mark_node;
} }
...@@ -1655,8 +1655,8 @@ dfs_walk_once (tree binfo, tree (*pre_fn) (tree, void *), ...@@ -1655,8 +1655,8 @@ dfs_walk_once (tree binfo, tree (*pre_fn) (tree, void *),
if (!BINFO_INHERITANCE_CHAIN (binfo)) if (!BINFO_INHERITANCE_CHAIN (binfo))
{ {
/* We are at the top of the hierarchy, and can use the /* We are at the top of the hierarchy, and can use the
CLASSTYPE_VBASECLASSES list for unmarking the virtual CLASSTYPE_VBASECLASSES list for unmarking the virtual
bases. */ bases. */
VEC(tree,gc) *vbases; VEC(tree,gc) *vbases;
unsigned ix; unsigned ix;
tree base_binfo; tree base_binfo;
...@@ -1710,8 +1710,8 @@ dfs_walk_once_accessible_r (tree binfo, bool friends_p, bool once, ...@@ -1710,8 +1710,8 @@ dfs_walk_once_accessible_r (tree binfo, bool friends_p, bool once,
continue; continue;
/* If the base is inherited via private or protected /* If the base is inherited via private or protected
inheritance, then we can't see it, unless we are a friend of inheritance, then we can't see it, unless we are a friend of
the current binfo. */ the current binfo. */
if (BINFO_BASE_ACCESS (binfo, ix) != access_public_node) if (BINFO_BASE_ACCESS (binfo, ix) != access_public_node)
{ {
tree scope; tree scope;
...@@ -1763,8 +1763,8 @@ dfs_walk_once_accessible (tree binfo, bool friends_p, ...@@ -1763,8 +1763,8 @@ dfs_walk_once_accessible (tree binfo, bool friends_p,
if (!BINFO_INHERITANCE_CHAIN (binfo)) if (!BINFO_INHERITANCE_CHAIN (binfo))
{ {
/* We are at the top of the hierarchy, and can use the /* We are at the top of the hierarchy, and can use the
CLASSTYPE_VBASECLASSES list for unmarking the virtual CLASSTYPE_VBASECLASSES list for unmarking the virtual
bases. */ bases. */
VEC(tree,gc) *vbases; VEC(tree,gc) *vbases;
unsigned ix; unsigned ix;
tree base_binfo; tree base_binfo;
...@@ -1903,7 +1903,7 @@ look_for_overrides (tree type, tree fndecl) ...@@ -1903,7 +1903,7 @@ look_for_overrides (tree type, tree fndecl)
tree basetype = BINFO_TYPE (base_binfo); tree basetype = BINFO_TYPE (base_binfo);
if (TYPE_POLYMORPHIC_P (basetype)) if (TYPE_POLYMORPHIC_P (basetype))
found += look_for_overrides_r (basetype, fndecl); found += look_for_overrides_r (basetype, fndecl);
} }
return found; return found;
} }
...@@ -1931,21 +1931,21 @@ look_for_overrides_here (tree type, tree fndecl) ...@@ -1931,21 +1931,21 @@ look_for_overrides_here (tree type, tree fndecl)
tree fns = VEC_index (tree, CLASSTYPE_METHOD_VEC (type), ix); tree fns = VEC_index (tree, CLASSTYPE_METHOD_VEC (type), ix);
for (; fns; fns = OVL_NEXT (fns)) for (; fns; fns = OVL_NEXT (fns))
{ {
tree fn = OVL_CURRENT (fns); tree fn = OVL_CURRENT (fns);
if (!DECL_VIRTUAL_P (fn)) if (!DECL_VIRTUAL_P (fn))
/* Not a virtual. */; /* Not a virtual. */;
else if (DECL_CONTEXT (fn) != type) else if (DECL_CONTEXT (fn) != type)
/* Introduced with a using declaration. */; /* Introduced with a using declaration. */;
else if (DECL_STATIC_FUNCTION_P (fndecl)) else if (DECL_STATIC_FUNCTION_P (fndecl))
{ {
tree btypes = TYPE_ARG_TYPES (TREE_TYPE (fn)); tree btypes = TYPE_ARG_TYPES (TREE_TYPE (fn));
tree dtypes = TYPE_ARG_TYPES (TREE_TYPE (fndecl)); tree dtypes = TYPE_ARG_TYPES (TREE_TYPE (fndecl));
if (compparms (TREE_CHAIN (btypes), dtypes)) if (compparms (TREE_CHAIN (btypes), dtypes))
return fn; return fn;
} }
else if (same_signature_p (fndecl, fn)) else if (same_signature_p (fndecl, fn))
return fn; return fn;
} }
} }
...@@ -2149,7 +2149,7 @@ check_hidden_convs (tree binfo, int virtual_depth, int virtualness, ...@@ -2149,7 +2149,7 @@ check_hidden_convs (tree binfo, int virtual_depth, int virtualness,
if (virtual_depth || virtualness) if (virtual_depth || virtualness)
{ {
/* In a virtual hierarchy, we could be hidden, or could hide a /* In a virtual hierarchy, we could be hidden, or could hide a
conversion function on the other_convs list. */ conversion function on the other_convs list. */
for (level = other_convs; level; level = TREE_CHAIN (level)) for (level = other_convs; level; level = TREE_CHAIN (level))
{ {
int we_hide_them; int we_hide_them;
......
...@@ -75,9 +75,9 @@ static tree finalize_nrv_r (tree *, int *, void *); ...@@ -75,9 +75,9 @@ static tree finalize_nrv_r (tree *, int *, void *);
example: example:
class A { class A {
typedef int X; typedef int X;
public: public:
X f(); X f();
}; };
A::X A::f(); A::X A::f();
...@@ -122,8 +122,8 @@ typedef struct deferred_access GTY(()) ...@@ -122,8 +122,8 @@ typedef struct deferred_access GTY(())
declared because code like: declared because code like:
class A { class A {
class B {}; class B {};
B* f(); B* f();
} }
A::B* A::f() { return 0; } A::B* A::f() { return 0; }
...@@ -498,11 +498,11 @@ finish_cond (tree *cond_p, tree expr) ...@@ -498,11 +498,11 @@ finish_cond (tree *cond_p, tree expr)
/* If *COND_P specifies a conditional with a declaration, transform the /* If *COND_P specifies a conditional with a declaration, transform the
loop such that loop such that
while (A x = 42) { } while (A x = 42) { }
for (; A x = 42;) { } for (; A x = 42;) { }
becomes becomes
while (true) { A x = 42; if (!x) break; } while (true) { A x = 42; if (!x) break; }
for (;;) { A x = 42; if (!x) break; } for (;;) { A x = 42; if (!x) break; }
The statement list for BODY will be empty if the conditional did The statement list for BODY will be empty if the conditional did
not declare anything. */ not declare anything. */
...@@ -827,7 +827,7 @@ finish_for_expr (tree expr, tree for_stmt) ...@@ -827,7 +827,7 @@ finish_for_expr (tree expr, tree for_stmt)
if (!processing_template_decl) if (!processing_template_decl)
{ {
if (warn_sequence_point) if (warn_sequence_point)
verify_sequence_points (expr); verify_sequence_points (expr);
expr = convert_to_void (expr, "3rd expression in for"); expr = convert_to_void (expr, "3rd expression in for");
} }
else if (!type_dependent_expression_p (expr)) else if (!type_dependent_expression_p (expr))
...@@ -1224,7 +1224,7 @@ finish_asm_stmt (int volatile_p, tree string, tree output_operands, ...@@ -1224,7 +1224,7 @@ finish_asm_stmt (int volatile_p, tree string, tree output_operands,
if (TREE_TYPE (operand) == unknown_type_node) if (TREE_TYPE (operand) == unknown_type_node)
{ {
error ("type of asm operand %qE could not be determined", error ("type of asm operand %qE could not be determined",
TREE_VALUE (t)); TREE_VALUE (t));
operand = error_mark_node; operand = error_mark_node;
} }
...@@ -1445,7 +1445,7 @@ check_accessibility_of_qualified_id (tree decl, ...@@ -1445,7 +1445,7 @@ check_accessibility_of_qualified_id (tree decl,
I *p; I *p;
p->A::I::~I(); p->A::I::~I();
In this case, we will have "A::I" as the DECL, but "I" as the In this case, we will have "A::I" as the DECL, but "I" as the
OBJECT_TYPE. */ OBJECT_TYPE. */
&& CLASS_TYPE_P (object_type) && CLASS_TYPE_P (object_type)
&& DERIVED_FROM_P (scope, object_type)) && DERIVED_FROM_P (scope, object_type))
...@@ -1822,7 +1822,7 @@ finish_call_expr (tree fn, tree args, bool disallow_virtual, bool koenig_p) ...@@ -1822,7 +1822,7 @@ finish_call_expr (tree fn, tree args, bool disallow_virtual, bool koenig_p)
. operator.... [Otherwise] a contrived object of type T . operator.... [Otherwise] a contrived object of type T
becomes the implied object argument. becomes the implied object argument.
This paragraph is unclear about this situation: This paragraph is unclear about this situation:
struct A { void f(); }; struct A { void f(); };
struct B : public A {}; struct B : public A {};
...@@ -1865,7 +1865,7 @@ finish_call_expr (tree fn, tree args, bool disallow_virtual, bool koenig_p) ...@@ -1865,7 +1865,7 @@ finish_call_expr (tree fn, tree args, bool disallow_virtual, bool koenig_p)
if (TREE_CODE (fn) == FUNCTION_DECL if (TREE_CODE (fn) == FUNCTION_DECL
&& (DECL_BUILT_IN_CLASS (fn) == BUILT_IN_NORMAL && (DECL_BUILT_IN_CLASS (fn) == BUILT_IN_NORMAL
|| DECL_BUILT_IN_CLASS (fn) == BUILT_IN_MD)) || DECL_BUILT_IN_CLASS (fn) == BUILT_IN_MD))
result = resolve_overloaded_builtin (fn, args); result = resolve_overloaded_builtin (fn, args);
if (!result) if (!result)
/* A call to a namespace-scope function. */ /* A call to a namespace-scope function. */
...@@ -1963,17 +1963,17 @@ finish_pseudo_destructor_expr (tree object, tree scope, tree destructor) ...@@ -1963,17 +1963,17 @@ finish_pseudo_destructor_expr (tree object, tree scope, tree destructor)
/* [expr.pseudo] says both: /* [expr.pseudo] says both:
The type designated by the pseudo-destructor-name shall be The type designated by the pseudo-destructor-name shall be
the same as the object type. the same as the object type.
and: and:
The cv-unqualified versions of the object type and of the The cv-unqualified versions of the object type and of the
type designated by the pseudo-destructor-name shall be the type designated by the pseudo-destructor-name shall be the
same type. same type.
We implement the more generous second sentence, since that is We implement the more generous second sentence, since that is
what most other compilers do. */ what most other compilers do. */
if (!same_type_ignoring_top_level_qualifiers_p (TREE_TYPE (object), if (!same_type_ignoring_top_level_qualifiers_p (TREE_TYPE (object),
destructor)) destructor))
{ {
...@@ -2122,10 +2122,10 @@ check_template_template_default_arg (tree argument) ...@@ -2122,10 +2122,10 @@ check_template_template_default_arg (tree argument)
if (CLASSTYPE_TEMPLATE_INFO (t) if (CLASSTYPE_TEMPLATE_INFO (t)
&& CLASSTYPE_TEMPLATE_INSTANTIATION (t)) && CLASSTYPE_TEMPLATE_INSTANTIATION (t))
error ("invalid use of type %qT as a default value for a " error ("invalid use of type %qT as a default value for a "
"template template-parameter", t); "template template-parameter", t);
else else
error ("invalid use of %qD as a default value for a template " error ("invalid use of %qD as a default value for a template "
"template-parameter", argument); "template-parameter", argument);
} }
else else
error ("invalid default argument for a template template parameter"); error ("invalid default argument for a template template parameter");
...@@ -2151,7 +2151,7 @@ begin_class_definition (tree t) ...@@ -2151,7 +2151,7 @@ begin_class_definition (tree t)
/* A non-implicit typename comes from code like: /* A non-implicit typename comes from code like:
template <typename T> struct A { template <typename T> struct A {
template <typename U> struct A<T>::B ... template <typename U> struct A<T>::B ...
This is erroneous. */ This is erroneous. */
else if (TREE_CODE (t) == TYPENAME_TYPE) else if (TREE_CODE (t) == TYPENAME_TYPE)
...@@ -2380,10 +2380,10 @@ finish_base_specifier (tree base, tree access, bool virtual_p) ...@@ -2380,10 +2380,10 @@ finish_base_specifier (tree base, tree access, bool virtual_p)
else else
{ {
if (cp_type_quals (base) != 0) if (cp_type_quals (base) != 0)
{ {
error ("base class %qT has cv qualifiers", base); error ("base class %qT has cv qualifiers", base);
base = TYPE_MAIN_VARIANT (base); base = TYPE_MAIN_VARIANT (base);
} }
result = build_tree_list (access, base); result = build_tree_list (access, base);
if (virtual_p) if (virtual_p)
TREE_TYPE (result) = integer_type_node; TREE_TYPE (result) = integer_type_node;
...@@ -2686,8 +2686,8 @@ finish_id_expression (tree id_expression, ...@@ -2686,8 +2686,8 @@ finish_id_expression (tree id_expression,
} }
/* Only certain kinds of names are allowed in constant /* Only certain kinds of names are allowed in constant
expression. Enumerators and template parameters have already expression. Enumerators and template parameters have already
been handled above. */ been handled above. */
if (integral_constant_expression_p if (integral_constant_expression_p
&& ! DECL_INTEGRAL_CONSTANT_VAR_P (decl) && ! DECL_INTEGRAL_CONSTANT_VAR_P (decl)
&& ! builtin_valid_in_constant_expr_p (decl)) && ! builtin_valid_in_constant_expr_p (decl))
...@@ -2851,8 +2851,8 @@ finish_typeof (tree expr) ...@@ -2851,8 +2851,8 @@ finish_typeof (tree expr)
static tree static tree
simplify_aggr_init_exprs_r (tree* tp, simplify_aggr_init_exprs_r (tree* tp,
int* walk_subtrees, int* walk_subtrees,
void* data ATTRIBUTE_UNUSED) void* data ATTRIBUTE_UNUSED)
{ {
/* We don't need to walk into types; there's nothing in a type that /* We don't need to walk into types; there's nothing in a type that
needs simplification. (And, furthermore, there are places we needs simplification. (And, furthermore, there are places we
...@@ -3022,9 +3022,9 @@ expand_body (tree fn) ...@@ -3022,9 +3022,9 @@ expand_body (tree fn)
if (DECL_CLONED_FUNCTION_P (fn)) if (DECL_CLONED_FUNCTION_P (fn))
{ {
/* If this is a clone, go through the other clones now and mark /* If this is a clone, go through the other clones now and mark
their parameters used. We have to do that here, as we don't their parameters used. We have to do that here, as we don't
know whether any particular clone will be expanded, and know whether any particular clone will be expanded, and
therefore cannot pick one arbitrarily. */ therefore cannot pick one arbitrarily. */
tree probe; tree probe;
for (probe = TREE_CHAIN (DECL_CLONED_FUNCTION (fn)); for (probe = TREE_CHAIN (DECL_CLONED_FUNCTION (fn));
......
...@@ -59,7 +59,7 @@ static tree handle_init_priority_attribute (tree *, tree, tree, int, bool *); ...@@ -59,7 +59,7 @@ static tree handle_init_priority_attribute (tree *, tree, tree, int, bool *);
static cp_lvalue_kind static cp_lvalue_kind
lvalue_p_1 (tree ref, lvalue_p_1 (tree ref,
int treat_class_rvalues_as_lvalues) int treat_class_rvalues_as_lvalues)
{ {
cp_lvalue_kind op1_lvalue_kind = clk_none; cp_lvalue_kind op1_lvalue_kind = clk_none;
cp_lvalue_kind op2_lvalue_kind = clk_none; cp_lvalue_kind op2_lvalue_kind = clk_none;
...@@ -93,9 +93,9 @@ lvalue_p_1 (tree ref, ...@@ -93,9 +93,9 @@ lvalue_p_1 (tree ref,
/* Look at the member designator. */ /* Look at the member designator. */
if (!op1_lvalue_kind if (!op1_lvalue_kind
/* The "field" can be a FUNCTION_DECL or an OVERLOAD in some /* The "field" can be a FUNCTION_DECL or an OVERLOAD in some
situations. */ situations. */
|| TREE_CODE (TREE_OPERAND (ref, 1)) != FIELD_DECL) || TREE_CODE (TREE_OPERAND (ref, 1)) != FIELD_DECL)
; ;
else if (DECL_C_BIT_FIELD (TREE_OPERAND (ref, 1))) else if (DECL_C_BIT_FIELD (TREE_OPERAND (ref, 1)))
{ {
/* Clear the ordinary bit. If this object was a class /* Clear the ordinary bit. If this object was a class
...@@ -433,8 +433,8 @@ build_cplus_array_type (tree elt_type, tree index_type) ...@@ -433,8 +433,8 @@ build_cplus_array_type (tree elt_type, tree index_type)
tree tree
cp_build_qualified_type_real (tree type, cp_build_qualified_type_real (tree type,
int type_quals, int type_quals,
tsubst_flags_t complain) tsubst_flags_t complain)
{ {
tree result; tree result;
int bad_quals = TYPE_UNQUALIFIED; int bad_quals = TYPE_UNQUALIFIED;
...@@ -528,17 +528,17 @@ cp_build_qualified_type_real (tree type, ...@@ -528,17 +528,17 @@ cp_build_qualified_type_real (tree type,
else else
{ {
if (complain & tf_ignore_bad_quals) if (complain & tf_ignore_bad_quals)
/* We're not going to warn about constifying things that can't /* We're not going to warn about constifying things that can't
be constified. */ be constified. */
bad_quals &= ~TYPE_QUAL_CONST; bad_quals &= ~TYPE_QUAL_CONST;
if (bad_quals) if (bad_quals)
{ {
tree bad_type = build_qualified_type (ptr_type_node, bad_quals); tree bad_type = build_qualified_type (ptr_type_node, bad_quals);
if (!(complain & tf_ignore_bad_quals)) if (!(complain & tf_ignore_bad_quals))
error ("%qV qualifiers cannot be applied to %qT", error ("%qV qualifiers cannot be applied to %qT",
bad_type, type); bad_type, type);
} }
} }
/* Retrieve (or create) the appropriately qualified variant. */ /* Retrieve (or create) the appropriately qualified variant. */
...@@ -899,7 +899,7 @@ build_exception_variant (tree type, tree raises) ...@@ -899,7 +899,7 @@ build_exception_variant (tree type, tree raises)
for (; v; v = TYPE_NEXT_VARIANT (v)) for (; v; v = TYPE_NEXT_VARIANT (v))
if (check_qualified_type (v, type, type_quals) if (check_qualified_type (v, type, type_quals)
&& comp_except_specs (raises, TYPE_RAISES_EXCEPTIONS (v), 1)) && comp_except_specs (raises, TYPE_RAISES_EXCEPTIONS (v), 1))
return v; return v;
/* Need to build a new variant. */ /* Need to build a new variant. */
...@@ -965,8 +965,8 @@ count_trees (tree t) ...@@ -965,8 +965,8 @@ count_trees (tree t)
static tree static tree
verify_stmt_tree_r (tree* tp, verify_stmt_tree_r (tree* tp,
int* walk_subtrees ATTRIBUTE_UNUSED , int* walk_subtrees ATTRIBUTE_UNUSED ,
void* data) void* data)
{ {
tree t = *tp; tree t = *tp;
htab_t *statements = (htab_t *) data; htab_t *statements = (htab_t *) data;
...@@ -1002,8 +1002,8 @@ verify_stmt_tree (tree t) ...@@ -1002,8 +1002,8 @@ verify_stmt_tree (tree t)
static tree static tree
find_tree_r (tree* tp, find_tree_r (tree* tp,
int* walk_subtrees ATTRIBUTE_UNUSED , int* walk_subtrees ATTRIBUTE_UNUSED ,
void* data) void* data)
{ {
if (*tp == (tree) data) if (*tp == (tree) data)
return (tree) data; return (tree) data;
...@@ -1146,8 +1146,8 @@ bot_manip (tree* tp, int* walk_subtrees, void* data) ...@@ -1146,8 +1146,8 @@ bot_manip (tree* tp, int* walk_subtrees, void* data)
if (!TYPE_P (t) && TREE_CONSTANT (t)) if (!TYPE_P (t) && TREE_CONSTANT (t))
{ {
/* There can't be any TARGET_EXPRs or their slot variables below /* There can't be any TARGET_EXPRs or their slot variables below
this point. We used to check !TREE_SIDE_EFFECTS, but then we this point. We used to check !TREE_SIDE_EFFECTS, but then we
failed to copy an ADDR_EXPR of the slot VAR_DECL. */ failed to copy an ADDR_EXPR of the slot VAR_DECL. */
*walk_subtrees = 0; *walk_subtrees = 0;
return NULL_TREE; return NULL_TREE;
} }
...@@ -1193,8 +1193,8 @@ bot_manip (tree* tp, int* walk_subtrees, void* data) ...@@ -1193,8 +1193,8 @@ bot_manip (tree* tp, int* walk_subtrees, void* data)
static tree static tree
bot_replace (tree* t, bot_replace (tree* t,
int* walk_subtrees ATTRIBUTE_UNUSED , int* walk_subtrees ATTRIBUTE_UNUSED ,
void* data) void* data)
{ {
splay_tree target_remap = ((splay_tree) data); splay_tree target_remap = ((splay_tree) data);
...@@ -1642,8 +1642,8 @@ maybe_dummy_object (tree type, tree* binfop) ...@@ -1642,8 +1642,8 @@ maybe_dummy_object (tree type, tree* 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;
...@@ -1722,17 +1722,17 @@ const struct attribute_spec cxx_attribute_table[] = ...@@ -1722,17 +1722,17 @@ const struct attribute_spec cxx_attribute_table[] =
{ "java_interface", 0, 0, false, false, false, handle_java_interface_attribute }, { "java_interface", 0, 0, false, false, false, handle_java_interface_attribute },
{ "com_interface", 0, 0, false, false, false, handle_com_interface_attribute }, { "com_interface", 0, 0, false, false, false, handle_com_interface_attribute },
{ "init_priority", 1, 1, true, false, false, handle_init_priority_attribute }, { "init_priority", 1, 1, true, false, false, handle_init_priority_attribute },
{ NULL, 0, 0, false, false, false, NULL } { NULL, 0, 0, false, false, false, NULL }
}; };
/* Handle a "java_interface" attribute; arguments as in /* Handle a "java_interface" attribute; arguments as in
struct attribute_spec.handler. */ struct attribute_spec.handler. */
static tree static tree
handle_java_interface_attribute (tree* node, handle_java_interface_attribute (tree* node,
tree name, tree name,
tree args ATTRIBUTE_UNUSED , tree args ATTRIBUTE_UNUSED ,
int flags, int flags,
bool* no_add_attrs) bool* no_add_attrs)
{ {
if (DECL_P (*node) if (DECL_P (*node)
|| !CLASS_TYPE_P (*node) || !CLASS_TYPE_P (*node)
...@@ -1754,10 +1754,10 @@ handle_java_interface_attribute (tree* node, ...@@ -1754,10 +1754,10 @@ handle_java_interface_attribute (tree* node,
struct attribute_spec.handler. */ struct attribute_spec.handler. */
static tree static tree
handle_com_interface_attribute (tree* node, handle_com_interface_attribute (tree* node,
tree name, tree name,
tree args ATTRIBUTE_UNUSED , tree args ATTRIBUTE_UNUSED ,
int flags ATTRIBUTE_UNUSED , int flags ATTRIBUTE_UNUSED ,
bool* no_add_attrs) bool* no_add_attrs)
{ {
static int warned; static int warned;
...@@ -1783,10 +1783,10 @@ handle_com_interface_attribute (tree* node, ...@@ -1783,10 +1783,10 @@ handle_com_interface_attribute (tree* node,
struct attribute_spec.handler. */ struct attribute_spec.handler. */
static tree static tree
handle_init_priority_attribute (tree* node, handle_init_priority_attribute (tree* node,
tree name, tree name,
tree args, tree args,
int flags ATTRIBUTE_UNUSED , int flags ATTRIBUTE_UNUSED ,
bool* no_add_attrs) bool* no_add_attrs)
{ {
tree initp_expr = TREE_VALUE (args); tree initp_expr = TREE_VALUE (args);
tree decl = *node; tree decl = *node;
...@@ -1819,7 +1819,7 @@ handle_init_priority_attribute (tree* node, ...@@ -1819,7 +1819,7 @@ handle_init_priority_attribute (tree* node,
|| current_function_decl) || current_function_decl)
{ {
error ("can only use %qE attribute on file-scope definitions " error ("can only use %qE attribute on file-scope definitions "
"of objects of class type", name); "of objects of class type", name);
*no_add_attrs = true; *no_add_attrs = true;
return NULL_TREE; return NULL_TREE;
} }
...@@ -1921,7 +1921,7 @@ cp_walk_subtrees (tree *tp, int *walk_subtrees_p, walk_tree_fn func, ...@@ -1921,7 +1921,7 @@ cp_walk_subtrees (tree *tp, int *walk_subtrees_p, walk_tree_fn func,
case TYPEOF_TYPE: case TYPEOF_TYPE:
case BASELINK: case BASELINK:
/* None of these have subtrees other than those already walked /* None of these have subtrees other than those already walked
above. */ above. */
*walk_subtrees_p = 0; *walk_subtrees_p = 0;
break; break;
......
...@@ -84,9 +84,9 @@ readonly_error (tree arg, const char* string, int soft) ...@@ -84,9 +84,9 @@ readonly_error (tree arg, const char* string, int soft)
if (TREE_CODE (arg) == COMPONENT_REF) if (TREE_CODE (arg) == COMPONENT_REF)
{ {
if (TYPE_READONLY (TREE_TYPE (TREE_OPERAND (arg, 0)))) if (TYPE_READONLY (TREE_TYPE (TREE_OPERAND (arg, 0))))
fmt = "%s of data-member %qD in read-only structure"; fmt = "%s of data-member %qD in read-only structure";
else else
fmt = "%s of read-only data-member %qD"; fmt = "%s of read-only data-member %qD";
(*fn) (fmt, string, TREE_OPERAND (arg, 1)); (*fn) (fmt, string, TREE_OPERAND (arg, 1));
} }
else if (TREE_CODE (arg) == VAR_DECL) else if (TREE_CODE (arg) == VAR_DECL)
...@@ -102,9 +102,9 @@ readonly_error (tree arg, const char* string, int soft) ...@@ -102,9 +102,9 @@ readonly_error (tree arg, const char* string, int soft)
else if (TREE_CODE (arg) == PARM_DECL) else if (TREE_CODE (arg) == PARM_DECL)
(*fn) ("%s of read-only parameter %qD", string, arg); (*fn) ("%s of read-only parameter %qD", string, arg);
else if (TREE_CODE (arg) == INDIRECT_REF else if (TREE_CODE (arg) == INDIRECT_REF
&& TREE_CODE (TREE_TYPE (TREE_OPERAND (arg, 0))) == REFERENCE_TYPE && TREE_CODE (TREE_TYPE (TREE_OPERAND (arg, 0))) == REFERENCE_TYPE
&& (TREE_CODE (TREE_OPERAND (arg, 0)) == VAR_DECL && (TREE_CODE (TREE_OPERAND (arg, 0)) == VAR_DECL
|| TREE_CODE (TREE_OPERAND (arg, 0)) == PARM_DECL)) || TREE_CODE (TREE_OPERAND (arg, 0)) == PARM_DECL))
(*fn) ("%s of read-only reference %qD", string, TREE_OPERAND (arg, 0)); (*fn) ("%s of read-only reference %qD", string, TREE_OPERAND (arg, 0));
else if (TREE_CODE (arg) == RESULT_DECL) else if (TREE_CODE (arg) == RESULT_DECL)
(*fn) ("%s of read-only named return value %qD", string, arg); (*fn) ("%s of read-only named return value %qD", string, arg);
...@@ -326,8 +326,8 @@ abstract_virtuals_error (tree decl, tree type) ...@@ -326,8 +326,8 @@ abstract_virtuals_error (tree decl, tree type)
for (ix = 0; VEC_iterate (tree, pure, ix, fn); ix++) for (ix = 0; VEC_iterate (tree, pure, ix, fn); ix++)
inform ("%J\t%#D", fn, fn); inform ("%J\t%#D", fn, fn);
/* Now truncate the vector. This leaves it non-null, so we know /* Now truncate the vector. This leaves it non-null, so we know
there are pure virtuals, but empty so we don't list them out there are pure virtuals, but empty so we don't list them out
again. */ again. */
VEC_truncate (tree, pure, 0); VEC_truncate (tree, pure, 0);
} }
else else
...@@ -386,7 +386,7 @@ cxx_incomplete_type_diagnostic (tree value, tree type, int diag_type) ...@@ -386,7 +386,7 @@ cxx_incomplete_type_diagnostic (tree value, tree type, int diag_type)
case UNION_TYPE: case UNION_TYPE:
case ENUMERAL_TYPE: case ENUMERAL_TYPE:
if (!decl) if (!decl)
(*p_msg) ("invalid use of undefined type %q#T", type); (*p_msg) ("invalid use of undefined type %q#T", type);
if (!TYPE_TEMPLATE_INFO (type)) if (!TYPE_TEMPLATE_INFO (type))
(*p_msg_at) ("forward declaration of %q#T", type); (*p_msg_at) ("forward declaration of %q#T", type);
else else
...@@ -399,10 +399,10 @@ cxx_incomplete_type_diagnostic (tree value, tree type, int diag_type) ...@@ -399,10 +399,10 @@ cxx_incomplete_type_diagnostic (tree value, tree type, int diag_type)
case ARRAY_TYPE: case ARRAY_TYPE:
if (TYPE_DOMAIN (type)) if (TYPE_DOMAIN (type))
{ {
type = TREE_TYPE (type); type = TREE_TYPE (type);
goto retry; goto retry;
} }
(*p_msg) ("invalid use of array with unspecified bounds"); (*p_msg) ("invalid use of array with unspecified bounds");
break; break;
...@@ -417,14 +417,14 @@ cxx_incomplete_type_diagnostic (tree value, tree type, int diag_type) ...@@ -417,14 +417,14 @@ cxx_incomplete_type_diagnostic (tree value, tree type, int diag_type)
case UNKNOWN_TYPE: case UNKNOWN_TYPE:
if (value && TREE_CODE (value) == COMPONENT_REF) if (value && TREE_CODE (value) == COMPONENT_REF)
goto bad_member; goto bad_member;
else if (value && TREE_CODE (value) == ADDR_EXPR) else if (value && TREE_CODE (value) == ADDR_EXPR)
(*p_msg) ("address of overloaded function with no contextual " (*p_msg) ("address of overloaded function with no contextual "
"type information"); "type information");
else if (value && TREE_CODE (value) == OVERLOAD) else if (value && TREE_CODE (value) == OVERLOAD)
(*p_msg) ("overloaded function with no contextual type information"); (*p_msg) ("overloaded function with no contextual type information");
else else
(*p_msg) ("insufficient contextual information to determine type"); (*p_msg) ("insufficient contextual information to determine type");
break; break;
default: default:
...@@ -474,10 +474,10 @@ split_nonconstant_init_1 (tree dest, tree init) ...@@ -474,10 +474,10 @@ split_nonconstant_init_1 (tree dest, tree init)
if (TREE_CODE (value) == CONSTRUCTOR) if (TREE_CODE (value) == CONSTRUCTOR)
{ {
if (array_type_p) if (array_type_p)
sub = build4 (ARRAY_REF, inner_type, dest, field_index, sub = build4 (ARRAY_REF, inner_type, dest, field_index,
NULL_TREE, NULL_TREE); NULL_TREE, NULL_TREE);
else else
sub = build3 (COMPONENT_REF, inner_type, dest, field_index, sub = build3 (COMPONENT_REF, inner_type, dest, field_index,
NULL_TREE); NULL_TREE);
split_nonconstant_init_1 (sub, value); split_nonconstant_init_1 (sub, value);
...@@ -487,10 +487,10 @@ split_nonconstant_init_1 (tree dest, tree init) ...@@ -487,10 +487,10 @@ split_nonconstant_init_1 (tree dest, tree init)
*pelt = TREE_CHAIN (elt); *pelt = TREE_CHAIN (elt);
if (array_type_p) if (array_type_p)
sub = build4 (ARRAY_REF, inner_type, dest, field_index, sub = build4 (ARRAY_REF, inner_type, dest, field_index,
NULL_TREE, NULL_TREE); NULL_TREE, NULL_TREE);
else else
sub = build3 (COMPONENT_REF, inner_type, dest, field_index, sub = build3 (COMPONENT_REF, inner_type, dest, field_index,
NULL_TREE); NULL_TREE);
code = build2 (MODIFY_EXPR, inner_type, sub, value); code = build2 (MODIFY_EXPR, inner_type, sub, value);
...@@ -580,7 +580,7 @@ store_init_value (tree decl, tree init) ...@@ -580,7 +580,7 @@ store_init_value (tree decl, tree init)
if (TREE_CODE (init) == TREE_LIST) if (TREE_CODE (init) == TREE_LIST)
{ {
error ("constructor syntax used, but no constructor declared " error ("constructor syntax used, but no constructor declared "
"for type %qT", type); "for type %qT", type);
init = build_constructor (NULL_TREE, nreverse (init)); init = build_constructor (NULL_TREE, nreverse (init));
} }
} }
...@@ -774,7 +774,7 @@ digest_init (tree type, tree init, tree* tail) ...@@ -774,7 +774,7 @@ digest_init (tree type, tree init, tree* tail)
if (TYPE_NON_AGGREGATE_CLASS (type)) if (TYPE_NON_AGGREGATE_CLASS (type))
{ {
error ("subobject of type %qT must be initialized by " error ("subobject of type %qT must be initialized by "
"constructor, not by %qE", "constructor, not by %qE",
type, init); type, init);
return error_mark_node; return error_mark_node;
} }
...@@ -994,17 +994,17 @@ process_init_constructor (tree type, tree init, tree* elts) ...@@ -994,17 +994,17 @@ process_init_constructor (tree type, tree init, tree* elts)
next1 = build_functional_cast (TREE_TYPE (field), next1 = build_functional_cast (TREE_TYPE (field),
NULL_TREE); NULL_TREE);
else else
{ {
next1 = build_constructor (NULL_TREE, NULL_TREE); next1 = build_constructor (NULL_TREE, NULL_TREE);
if (init) if (init)
TREE_HAS_CONSTRUCTOR (next1) TREE_HAS_CONSTRUCTOR (next1)
= TREE_HAS_CONSTRUCTOR (init); = TREE_HAS_CONSTRUCTOR (init);
} }
next1 = digest_init (TREE_TYPE (field), next1, 0); next1 = digest_init (TREE_TYPE (field), next1, 0);
/* Warn when some struct elements are implicitly initialized. */ /* Warn when some struct elements are implicitly initialized. */
if (warn_missing_field_initializers if (warn_missing_field_initializers
&& (!init || BRACE_ENCLOSED_INITIALIZER_P (init))) && (!init || BRACE_ENCLOSED_INITIALIZER_P (init)))
warning (0, "missing initializer for member %qD", field); warning (0, "missing initializer for member %qD", field);
} }
else else
...@@ -1019,7 +1019,7 @@ process_init_constructor (tree type, tree init, tree* elts) ...@@ -1019,7 +1019,7 @@ process_init_constructor (tree type, tree init, tree* elts)
/* Warn when some struct elements are implicitly initialized /* Warn when some struct elements are implicitly initialized
to zero. */ to zero. */
if (warn_missing_field_initializers if (warn_missing_field_initializers
&& (!init || BRACE_ENCLOSED_INITIALIZER_P (init))) && (!init || BRACE_ENCLOSED_INITIALIZER_P (init)))
warning (0, "missing initializer for member %qD", field); warning (0, "missing initializer for member %qD", field);
if (! zero_init_p (TREE_TYPE (field))) if (! zero_init_p (TREE_TYPE (field)))
...@@ -1074,7 +1074,7 @@ process_init_constructor (tree type, tree init, tree* elts) ...@@ -1074,7 +1074,7 @@ process_init_constructor (tree type, tree init, tree* elts)
field = temp, win = 1; field = temp, win = 1;
else else
error ("no field %qD in union being initialized", error ("no field %qD in union being initialized",
TREE_PURPOSE (tail)); TREE_PURPOSE (tail));
} }
if (!win) if (!win)
TREE_VALUE (tail) = error_mark_node; TREE_VALUE (tail) = error_mark_node;
...@@ -1082,7 +1082,7 @@ process_init_constructor (tree type, tree init, tree* elts) ...@@ -1082,7 +1082,7 @@ process_init_constructor (tree type, tree init, tree* elts)
else if (field == 0) else if (field == 0)
{ {
error ("union %qT with no named members cannot be initialized", error ("union %qT with no named members cannot be initialized",
type); type);
TREE_VALUE (tail) = error_mark_node; TREE_VALUE (tail) = error_mark_node;
} }
...@@ -1288,7 +1288,7 @@ build_m_component_ref (tree datum, tree component) ...@@ -1288,7 +1288,7 @@ build_m_component_ref (tree datum, tree component)
if (!TYPE_PTR_TO_MEMBER_P (ptrmem_type)) if (!TYPE_PTR_TO_MEMBER_P (ptrmem_type))
{ {
error ("%qE cannot be used as a member pointer, since it is of " error ("%qE cannot be used as a member pointer, since it is of "
"type %qT", "type %qT",
component, ptrmem_type); component, ptrmem_type);
return error_mark_node; return error_mark_node;
} }
...@@ -1297,8 +1297,8 @@ build_m_component_ref (tree datum, tree component) ...@@ -1297,8 +1297,8 @@ build_m_component_ref (tree datum, tree component)
if (! IS_AGGR_TYPE (objtype)) if (! IS_AGGR_TYPE (objtype))
{ {
error ("cannot apply member pointer %qE to %qE, which is of " error ("cannot apply member pointer %qE to %qE, which is of "
"non-aggregate type %qT", "non-aggregate type %qT",
component, datum, objtype); component, datum, objtype);
return error_mark_node; return error_mark_node;
} }
...@@ -1319,7 +1319,7 @@ build_m_component_ref (tree datum, tree component) ...@@ -1319,7 +1319,7 @@ build_m_component_ref (tree datum, tree component)
{ {
mismatch: mismatch:
error ("pointer to member type %qT incompatible with object " error ("pointer to member type %qT incompatible with object "
"type %qT", "type %qT",
type, objtype); type, objtype);
return error_mark_node; return error_mark_node;
} }
...@@ -1459,9 +1459,9 @@ add_exception_specifier (tree list, tree spec, int complain) ...@@ -1459,9 +1459,9 @@ add_exception_specifier (tree list, tree spec, int complain)
{ {
ok = true; ok = true;
/* 15.4/1 says that types in an exception specifier must be complete, /* 15.4/1 says that types in an exception specifier must be complete,
but it seems more reasonable to only require this on definitions but it seems more reasonable to only require this on definitions
and calls. So just give a pedwarn at this point; we will give an and calls. So just give a pedwarn at this point; we will give an
error later if we hit one of those two cases. */ error later if we hit one of those two cases. */
if (!COMPLETE_TYPE_P (complete_type (core))) if (!COMPLETE_TYPE_P (complete_type (core)))
diag_type = 2; /* pedwarn */ diag_type = 2; /* pedwarn */
} }
...@@ -1471,8 +1471,8 @@ add_exception_specifier (tree list, tree spec, int complain) ...@@ -1471,8 +1471,8 @@ add_exception_specifier (tree list, tree spec, int complain)
tree probe; tree probe;
for (probe = list; probe; probe = TREE_CHAIN (probe)) for (probe = list; probe; probe = TREE_CHAIN (probe))
if (same_type_p (TREE_VALUE (probe), spec)) if (same_type_p (TREE_VALUE (probe), spec))
break; break;
if (!probe) if (!probe)
list = tree_cons (NULL_TREE, spec, list); list = tree_cons (NULL_TREE, spec, list);
} }
...@@ -1502,20 +1502,20 @@ merge_exception_specifiers (tree list, tree add) ...@@ -1502,20 +1502,20 @@ merge_exception_specifiers (tree list, tree add)
tree orig_list = list; tree orig_list = list;
for (; add; add = TREE_CHAIN (add)) for (; add; add = TREE_CHAIN (add))
{ {
tree spec = TREE_VALUE (add); tree spec = TREE_VALUE (add);
tree probe; tree probe;
for (probe = orig_list; probe; probe = TREE_CHAIN (probe)) for (probe = orig_list; probe; probe = TREE_CHAIN (probe))
if (same_type_p (TREE_VALUE (probe), spec)) if (same_type_p (TREE_VALUE (probe), spec))
break; break;
if (!probe) if (!probe)
{ {
spec = build_tree_list (NULL_TREE, spec); spec = build_tree_list (NULL_TREE, spec);
TREE_CHAIN (spec) = list; TREE_CHAIN (spec) = list;
list = spec; list = spec;
} }
} }
} }
return list; return list;
} }
......
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