diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 6d4c3447b50b4966ec16595546e7f4a51f5c10ad..e54eb9d8888426aaa5675d29ea405fcda83d72f6 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,6 +1,80 @@ +Thu Aug 14 10:05:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com> + + * rtti.c (permanent_obstack): Fix decl to not be a pointer. + + * cp-tree.h (report_type_mismatch): Add prototype. + * call.c (build_overload_call_real): Remove erroneous fourth + argument to report_type_mismatch. + (build_user_type_conversion_1): Remove erroneous second arg to + tourney. + (build_new_function_call): Likewise. + (build_object_call): Likewise. + (build_new_op): Likewise. + (build_new_method_call): Likewise. + +Wed Aug 13 19:19:25 1997 Jason Merrill <jason@yorick.cygnus.com> + + * error.c (dump_decl): Don't bother processing a function with no + DECL_LANG_SPECIFIC. + + * method.c (emit_thunk): Call init_function_start in the macro case. + +Wed Aug 13 10:46:19 1997 H.J. Lu (hjl@gnu.ai.mit.edu) + + * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not + defined and used to set flag_vtable_thunks. + +Tue Aug 12 20:13:57 1997 Jason Merrill <jason@yorick.cygnus.com> + + * parse.y: Don't clear the inlines from their obstack until they've + all been processed. + + * decl.c (duplicate_decls): Don't complain about exception + specification mismatch if flag_exceptions is off. + +Mon Aug 11 15:01:56 1997 Marc Lehmann <pcg@goof.com> + + * Make-lang.in (c++.distclean): Remove g++.c on make distclean. + +Sun Aug 10 12:06:09 1997 Paul Eggert <eggert@twinsun.com> + + * cp-tree.h: Replace STDIO_PROTO with PROTO in include files. + * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c: + Include <stdio.h> before include files that formerly used STDIO_PROTO. + + * decl.c, g++spec.c, lex.c, method.c, repo.c: + Include "config.h" first, as per autoconf manual. + +Fri Aug 8 11:47:48 1997 Jason Merrill <jason@yorick.cygnus.com> + + * decl.c (duplicate_decls): Tweak wording. + * lex.c (do_pending_defargs): Don't die if we see a default arg + that isn't a DEFAULT_ARG. + * error.c (dump_expr): Handle DEFAULT_ARG. + + * decl2.c (lang_decode_option): Handle -fhandle-exceptions. + * lang-options.h: Add -fhandle-exceptions. + + * class.c (build_vtable): vtables are artificial. + (prepare_fresh_vtable): Likewise. + +Wed Aug 6 11:02:36 1997 Jason Merrill <jason@yorick.cygnus.com> + + * cvt.c (ocp_convert): After converting to the target type, set + LOOKUP_NO_CONVERSION. + + * call.c (joust): Warn about potentially confusing promotion rules + with -Wsign-promo. + * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo. + +Tue Aug 5 15:15:07 1997 Michael Meissner <meissner@cygnus.com> + + * exception.cc: Declare __terminate_func with noreturn attribute. + Fri Aug 1 03:18:15 1997 Jason Merrill <jason@yorick.cygnus.com> * parse.y: Break out eat_saved_input, handle errors. + (function_try_block): Use compstmt instead of compstmt_or_error. Thu Jul 31 17:14:04 1997 Jason Merrill <jason@yorick.cygnus.com> @@ -573,6 +647,8 @@ Mon Apr 21 15:42:27 1997 Jason Merrill <jason@yorick.cygnus.com> function is not changed. * call.c (build_over_call): Move setting of conv into the loop. + Note: this change, along with the related changes of the 18th thru + the 20th of April, fix an infinite loop problem in conversions. Sun Apr 20 16:24:29 1997 Jason Merrill <jason@yorick.cygnus.com> diff --git a/gcc/cp/Make-lang.in b/gcc/cp/Make-lang.in index 6748974820d8b7d2bef58937c1ad63a5c879fbb7..34d3016c8d985f0a5f1bda9fd5755262718eca8e 100644 --- a/gcc/cp/Make-lang.in +++ b/gcc/cp/Make-lang.in @@ -247,6 +247,7 @@ c++.clean: c++.distclean: -rm -f cp/config.status cp/Makefile -rm -f cp/parse.output + -rm -f g++.c c++.extraclean: c++.maintainer-clean: -rm -f cp/parse.c cp/parse.h diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 48c7bb96339ccfa30887aeb4b707868fbbd15229..ba313aaea48c09303aa450efb0dc1c5bf686b97e 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -2885,8 +2885,7 @@ build_overload_call_real (fnname, parms, flags, final_cp, require_complete) return NULL_TREE; if (flags & LOOKUP_COMPLAIN) - report_type_mismatch (cp, parms, "function", - decl_as_string (cp->function, 1)); + report_type_mismatch (cp, parms, "function"); return error_mark_node; } @@ -4287,7 +4286,7 @@ build_user_type_conversion_1 (totype, expr, flags) } candidates = splice_viable (candidates); - cand = tourney (candidates, totype); + cand = tourney (candidates); if (cand == 0) { @@ -4400,7 +4399,7 @@ build_new_function_call (fn, args, obj) return error_mark_node; } candidates = splice_viable (candidates); - cand = tourney (candidates, NULL_TREE); + cand = tourney (candidates); if (cand == 0) { @@ -4474,7 +4473,7 @@ build_object_call (obj, args) } candidates = splice_viable (candidates); - cand = tourney (candidates, NULL_TREE); + cand = tourney (candidates); if (cand == 0) { @@ -4749,7 +4748,7 @@ build_new_op (code, flags, arg1, arg2, arg3) return error_mark_node; } candidates = splice_viable (candidates); - cand = tourney (candidates, NULL_TREE); + cand = tourney (candidates); if (cand == 0) { @@ -5386,7 +5385,7 @@ build_new_method_call (instance, name, args, basetype_path, flags) return error_mark_node; } candidates = splice_viable (candidates); - cand = tourney (candidates, NULL_TREE); + cand = tourney (candidates); if (cand == 0) { @@ -5751,11 +5750,36 @@ joust (cand1, cand2) for (i = 0; i < len; ++i) { - int comp = compare_ics (TREE_VEC_ELT (cand1->convs, i+off1), - TREE_VEC_ELT (cand2->convs, i+off2)); + tree t1 = TREE_VEC_ELT (cand1->convs, i+off1); + tree t2 = TREE_VEC_ELT (cand2->convs, i+off2); + int comp = compare_ics (t1, t2); if (comp != 0) { + if (warn_sign_promo + && ICS_RANK (t1) + ICS_RANK (t2) == STD_RANK + PROMO_RANK + && TREE_CODE (t1) == STD_CONV + && TREE_CODE (t2) == STD_CONV + && TREE_CODE (TREE_TYPE (t1)) == INTEGER_TYPE + && TREE_CODE (TREE_TYPE (t2)) == INTEGER_TYPE + && (TYPE_PRECISION (TREE_TYPE (t1)) + == TYPE_PRECISION (TREE_TYPE (t2))) + && (TREE_UNSIGNED (TREE_TYPE (TREE_OPERAND (t1, 0))) + || (TREE_CODE (TREE_TYPE (TREE_OPERAND (t1, 0))) + == ENUMERAL_TYPE))) + { + tree type = TREE_TYPE (TREE_OPERAND (t1, 0)); + tree type1, type2; + if (comp > 0) + type1 = TREE_TYPE (t1), type2 = TREE_TYPE (t2); + else + type1 = TREE_TYPE (t2), type2 = TREE_TYPE (t1); + + cp_warning ("`%T' promotes to `%T', not `%T'", + type, type1, type2); + cp_warning (" in call to `%D'", DECL_NAME (cand1->fn)); + } + if (winner && comp != winner) { winner = 0; diff --git a/gcc/cp/class.c b/gcc/cp/class.c index 5ab16582b61dd255a0e699a210b6070bd9528740..0d33c80f88f2bc66758557664b6bb3039c4ae13f 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -671,6 +671,7 @@ build_vtable (binfo, type) TYPE_BINFO_VTABLE (type) = decl; TYPE_BINFO_VIRTUALS (type) = virtuals; + DECL_ARTIFICIAL (decl) = 1; TREE_STATIC (decl) = 1; #ifndef WRITABLE_VTABLES /* Make them READONLY by default. (mrs) */ @@ -781,6 +782,7 @@ prepare_fresh_vtable (binfo, for_type) /* Remember which class this vtable is really for. */ DECL_CONTEXT (new_decl) = for_type; + DECL_ARTIFICIAL (new_decl) = 1; TREE_STATIC (new_decl) = 1; BINFO_VTABLE (binfo) = pushdecl_top_level (new_decl); DECL_VIRTUAL_P (new_decl) = 1; diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index 201db3e6e15e42ddced65e28cf9d80c9025db70b..b8edc52b0cb8d6d6e4e2fb5074166a9d1c2b7eef 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -248,6 +248,11 @@ extern int warn_pmf2ptr; extern int warn_ecpp; +/* Nonzero means warn where overload resolution chooses a promotion from + unsigned to signed over a conversion to an unsigned of the same size. */ + +extern int warn_sign_promo; + /* Non-zero means warn when a function is declared extern and later inline. */ extern int warn_extern_inline; @@ -1463,7 +1468,7 @@ extern tree convert_and_check PROTO((tree, tree)); extern void overflow_warning PROTO((tree)); extern void unsigned_conversion_warning PROTO((tree, tree)); /* Read the rest of the current #-directive line. */ -extern char *get_directive_line STDIO_PROTO((FILE *)); +extern char *get_directive_line PROTO((FILE *)); /* Subroutine of build_binary_op, used for comparison operations. See if the operands have both been converted from subword integer types and, if so, perhaps change them both back to their original type. */ @@ -2265,7 +2270,7 @@ extern void yyerror PROTO((char *)); /* in method.c */ extern void init_method PROTO((void)); extern void do_inline_function_hair PROTO((tree, tree)); -/* skip report_type_mismatch */ +extern void report_type_mismatch PROTO((struct candidate *, tree, char *)); extern char *build_overload_name PROTO((tree, int, int)); extern tree build_static_name PROTO((tree, tree)); extern tree build_decl_overload PROTO((tree, tree, int)); diff --git a/gcc/cp/cvt.c b/gcc/cp/cvt.c index 8dbbf4ad9e5e5c5adc9dcc2c9731a3c0bc416d7e..20e86e0096f4b6ee29aa117eea7b481b41e22858 100644 --- a/gcc/cp/cvt.c +++ b/gcc/cp/cvt.c @@ -26,6 +26,7 @@ Boston, MA 02111-1307, USA. */ but what kind of conversions it does will depend on the language. */ #include "config.h" +#include <stdio.h> #include "tree.h" #include "flags.h" #include "cp-tree.h" @@ -1100,7 +1101,10 @@ ocp_convert (type, expr, convtype, flags) if ((flags & LOOKUP_ONLYCONVERTING) && ! (IS_AGGR_TYPE (dtype) && DERIVED_FROM_P (type, dtype))) - ctor = build_user_type_conversion (type, ctor, flags); + { + ctor = build_user_type_conversion (type, ctor, flags); + flags |= LOOKUP_NO_CONVERSION; + } if (ctor) ctor = build_method_call (NULL_TREE, ctor_identifier, build_tree_list (NULL_TREE, ctor), diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index a1aa9bbe7c19d78558dc63340183dfbf691182de..63e42b805c289b521062e62ea38e2f2eed2c6dd3 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -27,8 +27,8 @@ Boston, MA 02111-1307, USA. */ /* ??? not all decl nodes are given the most useful possible line numbers. For example, the CONST_DECLs for enum values. */ -#include <stdio.h> #include "config.h" +#include <stdio.h> #include "tree.h" #include "rtl.h" #include "flags.h" @@ -2576,7 +2576,7 @@ duplicate_decls (newdecl, olddecl) { cp_error ("default argument given for parameter %d of `%#D'", i, newdecl); - cp_error_at ("conflicts with previous specification in `%#D'", + cp_error_at ("after previous specification in `%#D'", olddecl); } } @@ -2699,6 +2699,7 @@ duplicate_decls (newdecl, olddecl) TYPE_RAISES_EXCEPTIONS (oldtype)); if ((pedantic || ! DECL_IN_SYSTEM_HEADER (olddecl)) + && flag_exceptions && ! compexcepttypes (TREE_TYPE (newdecl), TREE_TYPE (olddecl))) { cp_pedwarn ("declaration of `%D' throws different exceptions", diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index b4fced4a1270f6e0a7095218c4f9f945eb772746..5af605a83e14da6ae1dd0354619fdaff757de708 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -158,11 +158,10 @@ int warn_ctor_dtor_privacy = 1; /* True if we want to implement vtables using "thunks". The default is off. */ -#if defined(NEW_OVER) && defined (__i386__) -int flag_vtable_thunks = 1; -#else -int flag_vtable_thunks; +#ifndef DEFAULT_VTABLE_THUNKS +#define DEFAULT_VTABLE_THUNKS 0 #endif +int flag_vtable_thunks = DEFAULT_VTABLE_THUNKS; /* True if we want to deal with repository information. */ @@ -246,7 +245,12 @@ int warn_pmf2ptr = 1; /* Nonzero means warn about violation of some Effective C++ style rules. */ -int warn_ecpp = 0; +int warn_ecpp; + +/* Nonzero means warn where overload resolution chooses a promotion from + unsigned to signed over a conversion to an unsigned of the same size. */ + +int warn_sign_promo; /* Nonzero means `$' can be in an identifier. See cccp.c for reasons why this breaks some obscure ANSI C programs. */ @@ -409,6 +413,7 @@ static struct { char *string; int *variable; int on_value;} lang_f_options[] = {"all-virtual", &flag_all_virtual, 1}, {"memoize-lookups", &flag_memoize_lookups, 1}, {"elide-constructors", &flag_elide_constructors, 1}, + {"handle-exceptions", &flag_exceptions, 1}, {"handle-signatures", &flag_handle_signatures, 1}, {"default-inline", &flag_default_inline, 1}, {"dollars-in-identifiers", &dollars_in_ident, 1}, @@ -470,13 +475,17 @@ lang_decode_option (p) p += 2; /* Try special -f options. */ + if (!strcmp (p, "handle-exceptions") + || !strcmp (p, "no-handle-exceptions")) + warning ("-fhandle-exceptions has been renamed to -fexceptions (and is now on by default)"); + if (!strcmp (p, "save-memoized")) { flag_memoize_lookups = 1; flag_save_memoized_contexts = 1; found = 1; } - if (!strcmp (p, "no-save-memoized")) + else if (!strcmp (p, "no-save-memoized")) { flag_memoize_lookups = 0; flag_save_memoized_contexts = 0; @@ -585,6 +594,8 @@ lang_decode_option (p) warn_pmf2ptr = setting; else if (!strcmp (p, "effc++")) warn_ecpp = setting; + else if (!strcmp (p, "sign-promo")) + warn_sign_promo = setting; else if (!strcmp (p, "comment")) ; /* cpp handles this one. */ else if (!strcmp (p, "comments")) @@ -613,6 +624,7 @@ lang_decode_option (p) warn_uninitialized = (setting ? 2 : 0); warn_template_debugging = setting; warn_reorder = setting; + warn_sign_promo = setting; } else if (!strcmp (p, "overloaded-virtual")) diff --git a/gcc/cp/error.c b/gcc/cp/error.c index 98ca15f02aaee2a8b2c765144be0e2f59e45fe2c..ea675f346ee420c83dd9329612a3c7fba00cfa70 100644 --- a/gcc/cp/error.c +++ b/gcc/cp/error.c @@ -20,6 +20,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "config.h" +#include <stdio.h> #include "tree.h" #include "cp-tree.h" #include "obstack.h" @@ -700,6 +701,8 @@ dump_decl (t, v) case FUNCTION_DECL: if (GLOBAL_IORD_P (DECL_ASSEMBLER_NAME (t))) dump_global_iord (DECL_ASSEMBLER_NAME (t)); + else if (! DECL_LANG_SPECIFIC (t)) + OB_PUTS ("{internal}"); else dump_function_decl (t, v); break; @@ -1388,6 +1391,10 @@ dump_expr (t, nop) OB_PUTC (')'); break; + case DEFAULT_ARG: + OB_PUTS ("{unparsed}"); + break; + case TREE_LIST: if (TREE_VALUE (t) && TREE_CODE (TREE_VALUE (t)) == FUNCTION_DECL) { diff --git a/gcc/cp/except.c b/gcc/cp/except.c index 55ffa346507e0d086cdbf2f6ccd01fe6a8f8adf4..a5d8235857175e7655b9bff16423147830208e21 100644 --- a/gcc/cp/except.c +++ b/gcc/cp/except.c @@ -23,6 +23,7 @@ Boston, MA 02111-1307, USA. */ #include "config.h" +#include <stdio.h> #include "tree.h" #include "rtl.h" #include "cp-tree.h" @@ -44,8 +45,6 @@ tree builtin_return_address_fndecl; static tree BuiltinReturnAddress; -#include <stdio.h> - static void easy_expand_asm (str) char *str; diff --git a/gcc/cp/exception.cc b/gcc/cp/exception.cc index 5d9503fac545eeae8d96f90941f3110f693c9c8a..839525faafe8b1c66398f4ceda7ca11216da16b2 100644 --- a/gcc/cp/exception.cc +++ b/gcc/cp/exception.cc @@ -33,7 +33,7 @@ /* Define terminate, unexpected, set_terminate, set_unexpected as well as the default terminate func and default unexpected func. */ -extern terminate_handler __terminate_func; +extern terminate_handler __terminate_func __attribute__((__noreturn__)); void terminate () diff --git a/gcc/cp/expr.c b/gcc/cp/expr.c index 56db108ccde0ca75d3b891152d3cab67f2df37d9..fdc7815516978584961a0c8803a4c56114fb69d1 100644 --- a/gcc/cp/expr.c +++ b/gcc/cp/expr.c @@ -21,6 +21,7 @@ Boston, MA 02111-1307, USA. */ #include "config.h" +#include <stdio.h> #include "rtl.h" #include "tree.h" #include "flags.h" diff --git a/gcc/cp/friend.c b/gcc/cp/friend.c index 99295e65b9c09ef9d62b6ab56978612a569dabd3..26528862d0c9519f002b0a045cf38c04645cef94 100644 --- a/gcc/cp/friend.c +++ b/gcc/cp/friend.c @@ -19,6 +19,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "config.h" +#include <stdio.h> #include "tree.h" #include "rtl.h" #include "cp-tree.h" diff --git a/gcc/cp/g++spec.c b/gcc/cp/g++spec.c index d41c516f64e72d58adedf117bed06b7e66ed5af9..126e1c4d4678c77f57f511c30ef6c928881306c3 100644 --- a/gcc/cp/g++spec.c +++ b/gcc/cp/g++spec.c @@ -1,7 +1,8 @@ +#include "config.h" + #include <sys/types.h> #include <stdio.h> -#include "config.h" #include "gansidecl.h" /* This bit is set if we saw a `-xfoo' language specification. */ diff --git a/gcc/cp/init.c b/gcc/cp/init.c index 19853396acc79d70f7239068e49a26581a6b9443..a1cff1a5e095c9360755b45e1fb5d69ccea2d8ee 100644 --- a/gcc/cp/init.c +++ b/gcc/cp/init.c @@ -22,6 +22,7 @@ Boston, MA 02111-1307, USA. */ /* High-level class interface. */ #include "config.h" +#include <stdio.h> #include "tree.h" #include "rtl.h" #include "cp-tree.h" diff --git a/gcc/cp/lang-options.h b/gcc/cp/lang-options.h index 707282dae88493de08c94206267b4e128af06a86..73b37fb7d1d25042324b85c803e7db40c38fa3ae 100644 --- a/gcc/cp/lang-options.h +++ b/gcc/cp/lang-options.h @@ -50,6 +50,8 @@ Boston, MA 02111-1307, USA. */ "-fno-for-scope", "-fgnu-keywords", "-fno-gnu-keywords", + "-fhandle-exceptions", + "-fno-handle-exceptions", "-fhandle-signatures", "-fno-handle-signatures", "-fhuge-objects", @@ -104,3 +106,5 @@ Boston, MA 02111-1307, USA. */ "-Wno-pmf-conversions", "-Weffc++", "-Wno-effc++", + "-Wsign-promo", + "-Wno-sign-promo", diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c index 0e5e13e2b26788e8aee1640ca6ef6e9de4e1355d..2c4b5234074fff93edc4b072d5511b3b64614d22 100644 --- a/gcc/cp/lex.c +++ b/gcc/cp/lex.c @@ -25,11 +25,11 @@ Boston, MA 02111-1307, USA. */ /* Cause the `yydebug' variable to be defined. */ #define YYDEBUG 1 +#include "config.h" #include <sys/types.h> #include <stdio.h> #include <errno.h> #include <setjmp.h> -#include "config.h" #include "input.h" #include "tree.h" #include "lex.h" @@ -1865,10 +1865,9 @@ do_pending_defargs () defarg_parm = TREE_CHAIN (defarg_parm); for (; defarg_parm; defarg_parm = TREE_CHAIN (defarg_parm)) - if (TREE_PURPOSE (defarg_parm)) + if (TREE_PURPOSE (defarg_parm) + && TREE_CODE (TREE_PURPOSE (defarg_parm)) == DEFAULT_ARG) { - my_friendly_assert (TREE_CODE (TREE_PURPOSE (defarg_parm)) - == DEFAULT_ARG, 2349); feed_defarg (defarg_fn, defarg_parm); /* Return to the parser, which will process this defarg diff --git a/gcc/cp/method.c b/gcc/cp/method.c index fb2abeca255d4150494908675846789283b48022..a0e9d9610ae119bbb90c1b583285a019d25977c0 100644 --- a/gcc/cp/method.c +++ b/gcc/cp/method.c @@ -26,8 +26,8 @@ Boston, MA 02111-1307, USA. */ #endif /* Handle method declarations. */ -#include <stdio.h> #include "config.h" +#include <stdio.h> #include "tree.h" #include "cp-tree.h" #include "class.h" @@ -1777,6 +1777,7 @@ emit_thunk (thunk_fndecl) DECL_RESULT (thunk_fndecl) = build_decl (RESULT_DECL, 0, integer_type_node); fnname = XSTR (XEXP (DECL_RTL (thunk_fndecl), 0), 0); + init_function_start (thunk_fndecl, input_filename, lineno); assemble_start_function (thunk_fndecl, fnname); ASM_OUTPUT_MI_THUNK (asm_out_file, thunk_fndecl, delta, function); assemble_end_function (thunk_fndecl, fnname); diff --git a/gcc/cp/parse.y b/gcc/cp/parse.y index 9c990688b46223e737fcf47fb02e61dd368d7502..8514148604d7683c8b11968f675a4960bde295f5 100644 --- a/gcc/cp/parse.y +++ b/gcc/cp/parse.y @@ -2227,7 +2227,7 @@ structsp: { $$.t = $<ttype>6; $$.new_type_flag = 1; - if (current_scope () == current_function_decl) + if (current_class_type == NULL_TREE) clear_inline_text_obstack (); } | class_head %prec EMPTY @@ -3719,7 +3719,7 @@ function_try_block: store_parm_decls (); expand_start_early_try_stmts (); } - ctor_initializer_opt compstmt_or_error + ctor_initializer_opt compstmt { expand_start_all_catch (); } handler_seq { diff --git a/gcc/cp/repo.c b/gcc/cp/repo.c index d9b4486d1f029c998fef9b78ed1443bf30b4c8dc..c9406f23820ab6b4929349a708ad09bcf5b93b0b 100644 --- a/gcc/cp/repo.c +++ b/gcc/cp/repo.c @@ -25,8 +25,8 @@ Boston, MA 02111-1307, USA. */ The results of the automatic process should be easily reproducible with explicit code. */ -#include <stdio.h> #include "config.h" +#include <stdio.h> #include "tree.h" #include "cp-tree.h" #include "input.h" diff --git a/gcc/cp/rtti.c b/gcc/cp/rtti.c index 929298cb33e2805f59249373937bf6562e2513bd..4019eb14e16923945475f37108cf9a45042e4bde 100644 --- a/gcc/cp/rtti.c +++ b/gcc/cp/rtti.c @@ -21,6 +21,7 @@ Boston, MA 02111-1307, USA. */ #include "config.h" +#include <stdio.h> #include "tree.h" #include "cp-tree.h" #include "flags.h" @@ -33,7 +34,7 @@ Boston, MA 02111-1307, USA. */ extern tree define_function (); extern tree build_t_desc_overload (); -extern struct obstack *permanent_obstack; +extern struct obstack permanent_obstack; tree type_info_type_node; tree tinfo_fn_id;