Message ID | Pine.LNX.4.64.1009281159530.19604@digraph.polyomino.org.uk |
---|---|
State | New |
Headers | show |
I forgot to CC this patch <http://gcc.gnu.org/ml/gcc-patches/2010-09/msg02171.html> to the Fortran and Java lists; note the (mechanical) Fortran and Java pieces there. > gcc/fortran: > 2010-09-28 Joseph Myers <joseph@codesourcery.com> > > * cpp.c (cpp_define_builtins): Update naes of gfc_option_t > members. > (gfc_cpp_post_options): Update names of cpp_options members. > (cb_cpp_error): Update names of diagnostic_context members. > * f95-lang.c (gfc_init_builtin_functions): Update names of > gfc_option_t members. > * gfortran.h (gfc_option_t): Rename warn_conversion and > flag_openmp. > * intrinsic.c (gfc_convert_type_warn): Update names of > gfc_option_t members. > * options.c (gfc_init_options, gfc_post_options, set_Wall, > gfc_handle_option): Update names of gfc_option_t members. > * parse.c (next_free, next_fixed): Update names of gfc_option_t > members. > * scanner.c (pedantic): Remove extern declaration. > (skip_free_comments, skip_fixed_comments, include_line): Update > names of gfc_option_t members. > * trans-decl.c (gfc_generate_function_code): Update names of > gfc_option_t members. > > gcc/java: > 2010-09-28 Joseph Myers <joseph@codesourcery.com> > > * java-tree.h (flag_filelist_file, flag_assert, flag_jni, > flag_force_classes_archive_check, flag_redundant, flag_newer, > flag_use_divide_subroutine, flag_use_atomic_builtins, > flag_use_boehm_gc, flag_hash_synchronization, > flag_check_references, flag_optimize_sci, flag_indirect_classes, > flag_indirect_dispatch, flag_store_check, > flag_reduced_reflection): Remove. > * jcf-dump.c (flag_newer): Remove. > * jcf.h (quiet_flag): Remove. > * parse.h (quiet_flag): Remove.
On 09/28/2010 02:03 PM, Joseph S. Myers wrote: > I forgot to CC this patch > <http://gcc.gnu.org/ml/gcc-patches/2010-09/msg02171.html> to the Fortran > and Java lists; note the (mechanical) Fortran and Java pieces there. The Fortran part is really mechanical and OK. Nit: Please change "naes" to "names" in the first changelog item. Tobias >> gcc/fortran: >> 2010-09-28 Joseph Myers<joseph@codesourcery.com> >> >> * cpp.c (cpp_define_builtins): Update naes of gfc_option_t >> members. >> (gfc_cpp_post_options): Update names of cpp_options members. >> (cb_cpp_error): Update names of diagnostic_context members. >> * f95-lang.c (gfc_init_builtin_functions): Update names of >> gfc_option_t members. >> * gfortran.h (gfc_option_t): Rename warn_conversion and >> flag_openmp. >> * intrinsic.c (gfc_convert_type_warn): Update names of >> gfc_option_t members. >> * options.c (gfc_init_options, gfc_post_options, set_Wall, >> gfc_handle_option): Update names of gfc_option_t members. >> * parse.c (next_free, next_fixed): Update names of gfc_option_t >> members. >> * scanner.c (pedantic): Remove extern declaration. >> (skip_free_comments, skip_fixed_comments, include_line): Update >> names of gfc_option_t members. >> * trans-decl.c (gfc_generate_function_code): Update names of >> gfc_option_t members.
On 09/28/2010 01:03 PM, Joseph S. Myers wrote: > I forgot to CC this patch > <http://gcc.gnu.org/ml/gcc-patches/2010-09/msg02171.html> to the Fortran > and Java lists; note the (mechanical) Fortran and Java pieces there. > >> >> gcc/java: >> 2010-09-28 Joseph Myers <joseph@codesourcery.com> >> >> * java-tree.h (flag_filelist_file, flag_assert, flag_jni, >> flag_force_classes_archive_check, flag_redundant, flag_newer, >> flag_use_divide_subroutine, flag_use_atomic_builtins, >> flag_use_boehm_gc, flag_hash_synchronization, >> flag_check_references, flag_optimize_sci, flag_indirect_classes, >> flag_indirect_dispatch, flag_store_check, >> flag_reduced_reflection): Remove. >> * jcf-dump.c (flag_newer): Remove. >> * jcf.h (quiet_flag): Remove. >> * parse.h (quiet_flag): Remove. > OK, thanks. Andrew.
On Tue, Sep 28, 2010 at 2:00 PM, Joseph S. Myers <joseph@codesourcery.com> wrote: > This patch (which includes Fortran and Java pieces) changes individual > variables set by command-line options into elements of a gcc_options > structure, with the variables becoming macros for appropriate elements > of a global_options instance of this structure. > > In this first patch, pointers to such structures are not yet passed > around; everything uses the global_options instance, generally > implicitly using the macros. Subsequent patches will make more code > use the structures explicitly so that there can be multiple such > structures in the driver corresponding to the command line and to each > multilib. > > The main functionality of this patch is generating the structure and > associated initializer. The main bulk of it is consequential changes > elsewhere in the compiler. > > * Because macros occupy a global namespace, all other uses of the many > names that are now macros need to be fixed. This covers uses as > structure elements, plus redundant explicit declarations of > variables (especially target_flags) defined in .opt files. > > * ARM and MIPS have definitions of HARD_FRAME_POINTER_REGNUM that > depend on command-line option settings. This macro is also used in > preprocessor conditionals in rtl.h and elsewhere. These > conditionals happened to work despite the value not being constant; > whether the value was equal to FRAME_POINTER_REGNUM or > ARG_POINTER_REGNUM did not actually depend on the command line. But > when those option settings now refer to elements of a structure, > rather than just to an identifier such as target_flags (which is > treated as 0 in a #if condition), they contain the "." operator > which is not permitted in such conditions. This is fixed by adding > new HARD_FRAME_POINTER_IS_FRAME_POINTER and > HARD_FRAME_POINTER_IS_ARG_POINTER macros which these targets define > to 0. We are moving away from target macros, so please make this a hook instead or think of an alternative solution. The patch is ok with that change. Thanks, Richard. > * flag_compare_debug is checked directly in Ada code so cannot become > a macro; I made it a variable explicitly handled in C code rather > than through the .opt file. This is not a problem for multilib > selection since it could never make sense for this option to affect > the choice of multilib. > > * After this patch, nothing uses VarExists settings in .opt files at > all; a followup patch will remove the VarExists facility. VarExists > wasn't actually needed anyway; ia64.opt defines > TARGET_INLINE_FLOAT_DIV three times without VarExists, m32c.opt > defines target_cpu four times and spu.opt defines spu_dual_nops > twice. Previously this worked by generating tentative definitions > in options.c: each option would be processed in alphabetical order, > those without Init would generate tentative definitions of the > variable, one with Init would generate an initialized definition and > subsequent ones would not generate any declarations in options.c. > Now the initializers need to be generated strictly in order (the > same order as in options.h) they are processed in a way that does > not use VarExists at all. > > Bootstrapped with no regressions on x86_64-unknown-linux-gnu. I also > tested building cc1 for the following targets to find cases of uses of > the new macro names that needed fixing (there may, however, be more > cases in .c and .h files this didn't cover; I only tested one target > per architecture here): alpha-linux-gnu arc-elf arm-eabi avr-elf > bfin-elf cris-elf crx-elf fr30-elf frv-elf h8300-elf ia64-elf > iq2000-elf lm32-elf m32c-elf m32r-elf m68hc11-elf m68k-elf mcore-elf > mep-elf mips-elf mn10300-elf moxie-elf hppa-linux-gnu pdp11-none > picochip-none powerpc-eabi rx-elf s390-linux-gnu score-elf sh-elf > sparc-elf spu-elf xstormy16-elf v850-elf vax-linux-gnu xtensa-elf. OK > to commit? > > gcc: > 2010-09-28 Joseph Myers <joseph@codesourcery.com> > > * optc-gen.awk: Generate global_options initializer instead of > individual variables. Add x_ prefix to names of structure > members. > * opth-gen.awk: Generate gcc_options structure. Add x_ prefix to > naes of structure members. > * doc/tm.texi.in (HARD_FRAME_POINTER_IS_FRAME_POINTER, > HARD_FRAME_POINTER_IS_ARG_POINTER): Document. > * doc/tm.texi: Regenerate. > * alias.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER > * builtins.c: Use HARD_FRAME_POINTER_IS_ARG_POINTER. > * c-parser.c (disable_extension_diagnostics, > restore_extension_diagnostics): Update names of cpp_options > members. > * combine.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER > * common.opt (fcompare-debug-second): Don't use Var. > * config/alpha/alpha.h (target_flags): Remove. > * config/arm/arm.h (HARD_FRAME_POINTER_IS_FRAME_POINTER, > HARD_FRAME_POINTER_IS_ARG_POINTER): Define. > * config/bfin/bfin.h (target_flags): Remove. > * config/cris/cris.h (target_flags): Remove. > * config/i386/i386-c.c (ix86_pragma_target_parse): Update names of > cl_target_option members. > * config/i386/i386.c (ix86_force_align_arg_pointer): Remove. > (ix86_function_specific_print, ix86_valid_target_attribute_tree, > ix86_can_inline_p): Update names of cl_target_option members. > * config/i386/i386.h (ix86_isa_flags): Remove. > * config/lm32/lm32.h (target_flags): Remove. > * config/mcore/mcore.h (mcore_stack_increment): Remove. > * config/mcore/mcore.md (addsi3): Remove extern declaration of > flag_omit_frame_pointer. > * config/mep/mep.h (target_flags): Remove. > * config/mips/mips.h (HARD_FRAME_POINTER_IS_FRAME_POINTER, > HARD_FRAME_POINTER_IS_ARG_POINTER): Define. > * config/mmix/mmix.h (target_flags): Remove. > * config/rs6000/rs6000.h (rs6000_xilinx_fpu, flag_pic, > flag_expensive_optimizations): Remove. > * config/s390/s390.h (flag_pic): Remove. > * config/score/score-conv.h (target_flags): Remove. > * config/sh/sh.h (sh_fixed_range_str): Remove. > * config/spu/spu.h (target_flags, spu_fixed_range_string): Remove. > * dbxout.c: Use HARD_FRAME_POINTER_IS_ARG_POINTER > * df-scan.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER. > * diagnostic.c (diagnostic_initialize): Update names of > diagnostic_context members. > * diagnostic.h (diagnostic_context): Rename inhibit_warnings and > warn_system_headers. > (diagnostic_report_warnings_p): Update for new names. > * dwarf2out.c: Use HARD_FRAME_POINTER_IS_ARG_POINTER > * emit-rtl.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER and > HARD_FRAME_POINTER_IS_ARG_POINTER. > * flags.h (flag_compare_debug): Declare. > * ira.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER > * opts.c (flag_compare_debug): Define. > (common_handle_option): Update names of diagnostic_context > members. Handle -fcompare-debug-second. > (fast_math_flags_struct_set_p): Update names of cl_optimization > members. > * reginfo.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER. > * regrename.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER. > * reload.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER. > * reload1.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER. > * resource.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER. > * rtl.h (HARD_FRAME_POINTER_IS_FRAME_POINTER, > HARD_FRAME_POINTER_IS_ARG_POINTER): Define and use. > * sel-sched.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER > * stmt.c: Use HARD_FRAME_POINTER_IS_ARG_POINTER. > > gcc/c-family: > 2010-09-28 Joseph Myers <joseph@codesourcery.com> > > * c-common.c (c_cpp_error): Update names of diagnostic_context > members. > * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of > cl_optimization members. > * c-opts.c (warning_as_error_callback, c_common_handle_option, > sanitize_cpp_opts, finish_options): Update names of cpp_options > members. > > gcc/fortran: > 2010-09-28 Joseph Myers <joseph@codesourcery.com> > > * cpp.c (cpp_define_builtins): Update naes of gfc_option_t > members. > (gfc_cpp_post_options): Update names of cpp_options members. > (cb_cpp_error): Update names of diagnostic_context members. > * f95-lang.c (gfc_init_builtin_functions): Update names of > gfc_option_t members. > * gfortran.h (gfc_option_t): Rename warn_conversion and > flag_openmp. > * intrinsic.c (gfc_convert_type_warn): Update names of > gfc_option_t members. > * options.c (gfc_init_options, gfc_post_options, set_Wall, > gfc_handle_option): Update names of gfc_option_t members. > * parse.c (next_free, next_fixed): Update names of gfc_option_t > members. > * scanner.c (pedantic): Remove extern declaration. > (skip_free_comments, skip_fixed_comments, include_line): Update > names of gfc_option_t members. > * trans-decl.c (gfc_generate_function_code): Update names of > gfc_option_t members. > > gcc/java: > 2010-09-28 Joseph Myers <joseph@codesourcery.com> > > * java-tree.h (flag_filelist_file, flag_assert, flag_jni, > flag_force_classes_archive_check, flag_redundant, flag_newer, > flag_use_divide_subroutine, flag_use_atomic_builtins, > flag_use_boehm_gc, flag_hash_synchronization, > flag_check_references, flag_optimize_sci, flag_indirect_classes, > flag_indirect_dispatch, flag_store_check, > flag_reduced_reflection): Remove. > * jcf-dump.c (flag_newer): Remove. > * jcf.h (quiet_flag): Remove. > * parse.h (quiet_flag): Remove. > > libcpp: > 2010-09-28 Joseph Myers <joseph@codesourcery.com> > > * include/cpplib.h (cpp_options): Rename warn_deprecated, > warn_traditional, warn_long_long and pedantic. > * directives.c (directive_diagnostics, _cpp_handle_directive): > Update names of cpp_options members. > * expr.c (cpp_classify_number, eval_token): Update names of > cpp_options members. > * init.c (cpp_create_reader, post_options): Update names of > cpp_options members. > * internal.h (CPP_PEDANTIC, CPP_WTRADITIONAL): Update names of > cpp_options members. > * macro.c (parse_params): Update names of cpp_options members. > > Index: gcc/regrename.c > =================================================================== > --- gcc/regrename.c (revision 164599) > +++ gcc/regrename.c (working copy) > @@ -200,7 +200,7 @@ regrename_optimize (void) > if (frame_pointer_needed) > { > add_to_hard_reg_set (&unavailable, Pmode, FRAME_POINTER_REGNUM); > -#if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM > +#if !HARD_FRAME_POINTER_IS_FRAME_POINTER > add_to_hard_reg_set (&unavailable, Pmode, HARD_FRAME_POINTER_REGNUM); > #endif > } > @@ -233,7 +233,7 @@ regrename_optimize (void) > #endif > > if (fixed_regs[reg] || global_regs[reg] > -#if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM > +#if !HARD_FRAME_POINTER_IS_FRAME_POINTER > || (frame_pointer_needed && reg == HARD_FRAME_POINTER_REGNUM) > #else > || (frame_pointer_needed && reg == FRAME_POINTER_REGNUM) > Index: gcc/doc/tm.texi > =================================================================== > --- gcc/doc/tm.texi (revision 164599) > +++ gcc/doc/tm.texi (working copy) > @@ -3643,6 +3643,22 @@ pointer register, then you must mark it > (@pxref{Elimination}). > @end defmac > > +@defmac HARD_FRAME_POINTER_IS_FRAME_POINTER > +Define this to a preprocessor constant that is nonzero if > +@code{hard_frame_pointer_rtx} and @code{frame_pointer_rtx} should be > +the same. The default definition is @samp{(HARD_FRAME_POINTER_REGNUM > +== FRAME_POINTER_REGNUM)}; you only need to define this macro if that > +definition is not suitable for use in preprocessor conditionals. > +@end defmac > + > +@defmac HARD_FRAME_POINTER_IS_ARG_POINTER > +Define this to a preprocessor constant that is nonzero if > +@code{hard_frame_pointer_rtx} and @code{arg_pointer_rtx} should be the > +same. The default definition is @samp{(HARD_FRAME_POINTER_REGNUM == > +ARG_POINTER_REGNUM)}; you only need to define this macro if that > +definition is not suitable for use in preprocessor conditionals. > +@end defmac > + > @defmac RETURN_ADDRESS_POINTER_REGNUM > The register number of the return address pointer register, which is used to > access the current function's return address from the stack. On some > Index: gcc/doc/tm.texi.in > =================================================================== > --- gcc/doc/tm.texi.in (revision 164599) > +++ gcc/doc/tm.texi.in (working copy) > @@ -3643,6 +3643,22 @@ pointer register, then you must mark it > (@pxref{Elimination}). > @end defmac > > +@defmac HARD_FRAME_POINTER_IS_FRAME_POINTER > +Define this to a preprocessor constant that is nonzero if > +@code{hard_frame_pointer_rtx} and @code{frame_pointer_rtx} should be > +the same. The default definition is @samp{(HARD_FRAME_POINTER_REGNUM > +== FRAME_POINTER_REGNUM)}; you only need to define this macro if that > +definition is not suitable for use in preprocessor conditionals. > +@end defmac > + > +@defmac HARD_FRAME_POINTER_IS_ARG_POINTER > +Define this to a preprocessor constant that is nonzero if > +@code{hard_frame_pointer_rtx} and @code{arg_pointer_rtx} should be the > +same. The default definition is @samp{(HARD_FRAME_POINTER_REGNUM == > +ARG_POINTER_REGNUM)}; you only need to define this macro if that > +definition is not suitable for use in preprocessor conditionals. > +@end defmac > + > @defmac RETURN_ADDRESS_POINTER_REGNUM > The register number of the return address pointer register, which is used to > access the current function's return address from the stack. On some > Index: gcc/flags.h > =================================================================== > --- gcc/flags.h (revision 164599) > +++ gcc/flags.h (working copy) > @@ -77,6 +77,11 @@ extern void set_struct_debug_option (con > debugging information. */ > extern bool use_gnu_debug_info_extensions; > > +/* Run the second compilation of -fcompare-debug. Not defined using > + Var in common.opt because this is used in Ada code and so must be > + an actual variable not a macro. */ > +extern int flag_compare_debug; > + > /* Enumerate visibility settings. This is deliberately ordered from most > to least visibility. */ > #ifndef SYMBOL_VISIBILITY_DEFINED > Index: gcc/c-family/c-opts.c > =================================================================== > --- gcc/c-family/c-opts.c (revision 164599) > +++ gcc/c-family/c-opts.c (working copy) > @@ -157,7 +157,7 @@ warning_as_error_callback (int option_in > break; > > case OPT_Wdeprecated: > - cpp_opts->warn_deprecated = 1; > + cpp_opts->cpp_warn_deprecated = 1; > break; > > case OPT_Wcomment: > @@ -173,11 +173,11 @@ warning_as_error_callback (int option_in > break; > > case OPT_Wtraditional: > - cpp_opts->warn_traditional = 1; > + cpp_opts->cpp_warn_traditional = 1; > break; > > case OPT_Wlong_long: > - cpp_opts->warn_long_long = 1; > + cpp_opts->cpp_warn_long_long = 1; > break; > > case OPT_Wendif_labels: > @@ -508,7 +508,7 @@ c_common_handle_option (size_t scode, co > break; > > case OPT_Wdeprecated: > - cpp_opts->warn_deprecated = value; > + cpp_opts->cpp_warn_deprecated = value; > break; > > case OPT_Wendif_labels: > @@ -567,7 +567,7 @@ c_common_handle_option (size_t scode, co > break; > > case OPT_Wtraditional: > - cpp_opts->warn_traditional = value; > + cpp_opts->cpp_warn_traditional = value; > break; > > case OPT_Wtrigraphs: > @@ -788,7 +788,7 @@ c_common_handle_option (size_t scode, co > is not overridden. */ > case OPT_pedantic_errors: > case OPT_pedantic: > - cpp_opts->pedantic = 1; > + cpp_opts->cpp_pedantic = 1; > cpp_opts->warn_endif_labels = 1; > if (warn_pointer_sign == -1) > warn_pointer_sign = 1; > @@ -1314,7 +1314,7 @@ sanitize_cpp_opts (void) > if (warn_long_long == -1) > warn_long_long = ((pedantic || warn_traditional) > && (c_dialect_cxx () ? cxx_dialect == cxx98 : !flag_isoc99)); > - cpp_opts->warn_long_long = warn_long_long; > + cpp_opts->cpp_warn_long_long = warn_long_long; > > /* Similarly with -Wno-variadic-macros. No check for c99 here, since > this also turns off warnings about GCCs extension. */ > @@ -1381,7 +1381,7 @@ finish_options (void) > conflict with the specified standard, and since a strictly > conforming program cannot contain a '$', we do not condition > their acceptance on the -std= setting. */ > - cpp_opts->warn_dollars = (cpp_opts->pedantic && !cpp_opts->c99); > + cpp_opts->warn_dollars = (cpp_opts->cpp_pedantic && !cpp_opts->c99); > > cb_file_change (parse_in, > linemap_add (line_table, LC_RENAME, 0, > Index: gcc/c-family/c-common.c > =================================================================== > --- gcc/c-family/c-common.c (revision 164599) > +++ gcc/c-family/c-common.c (working copy) > @@ -8252,7 +8252,7 @@ c_cpp_error (cpp_reader *pfile ATTRIBUTE > { > diagnostic_info diagnostic; > diagnostic_t dlevel; > - bool save_warn_system_headers = global_dc->warn_system_headers; > + bool save_warn_system_headers = global_dc->dc_warn_system_headers; > bool ret; > > switch (level) > @@ -8260,7 +8260,7 @@ c_cpp_error (cpp_reader *pfile ATTRIBUTE > case CPP_DL_WARNING_SYSHDR: > if (flag_no_output) > return false; > - global_dc->warn_system_headers = 1; > + global_dc->dc_warn_system_headers = 1; > /* Fall through. */ > case CPP_DL_WARNING: > if (flag_no_output) > @@ -8297,7 +8297,7 @@ c_cpp_error (cpp_reader *pfile ATTRIBUTE > c_option_controlling_cpp_error (reason)); > ret = report_diagnostic (&diagnostic); > if (level == CPP_DL_WARNING_SYSHDR) > - global_dc->warn_system_headers = save_warn_system_headers; > + global_dc->dc_warn_system_headers = save_warn_system_headers; > return ret; > } > > Index: gcc/c-family/c-cppbuiltin.c > =================================================================== > --- gcc/c-family/c-cppbuiltin.c (revision 164599) > +++ gcc/c-family/c-cppbuiltin.c (working copy) > @@ -514,14 +514,14 @@ c_cpp_builtins_optimize_pragma (cpp_read > > /* Other target-independent built-ins determined by command-line > options. */ > - if (!prev->optimize_size && cur->optimize_size) > + if (!prev->x_optimize_size && cur->x_optimize_size) > cpp_define (pfile, "__OPTIMIZE_SIZE__"); > - else if (prev->optimize_size && !cur->optimize_size) > + else if (prev->x_optimize_size && !cur->x_optimize_size) > cpp_undef (pfile, "__OPTIMIZE_SIZE__"); > > - if (!prev->optimize && cur->optimize) > + if (!prev->x_optimize && cur->x_optimize) > cpp_define (pfile, "__OPTIMIZE__"); > - else if (prev->optimize && !cur->optimize) > + else if (prev->x_optimize && !cur->x_optimize) > cpp_undef (pfile, "__OPTIMIZE__"); > > prev_fast_math = fast_math_flags_struct_set_p (prev); > @@ -531,17 +531,17 @@ c_cpp_builtins_optimize_pragma (cpp_read > else if (prev_fast_math && !cur_fast_math) > cpp_undef (pfile, "__FAST_MATH__"); > > - if (!prev->flag_signaling_nans && cur->flag_signaling_nans) > + if (!prev->x_flag_signaling_nans && cur->x_flag_signaling_nans) > cpp_define (pfile, "__SUPPORT_SNAN__"); > - else if (prev->flag_signaling_nans && !cur->flag_signaling_nans) > + else if (prev->x_flag_signaling_nans && !cur->x_flag_signaling_nans) > cpp_undef (pfile, "__SUPPORT_SNAN__"); > > - if (!prev->flag_finite_math_only && cur->flag_finite_math_only) > + if (!prev->x_flag_finite_math_only && cur->x_flag_finite_math_only) > { > cpp_undef (pfile, "__FINITE_MATH_ONLY__"); > cpp_define (pfile, "__FINITE_MATH_ONLY__=1"); > } > - else if (!prev->flag_finite_math_only && cur->flag_finite_math_only) > + else if (!prev->x_flag_finite_math_only && cur->x_flag_finite_math_only) > { > cpp_undef (pfile, "__FINITE_MATH_ONLY__"); > cpp_define (pfile, "__FINITE_MATH_ONLY__=0"); > Index: gcc/java/jcf-dump.c > =================================================================== > --- gcc/java/jcf-dump.c (revision 164599) > +++ gcc/java/jcf-dump.c (working copy) > @@ -76,10 +76,6 @@ int flag_print_fields = 1; > int flag_print_methods = 1; > int flag_print_attributes = 1; > > -/* When nonzero, warn when source file is newer than matching class > - file. */ > -int flag_newer = 1; > - > /* Print names of classes that have a "main" method. */ > int flag_print_main = 0; > > Index: gcc/java/jcf.h > =================================================================== > --- gcc/java/jcf.h (revision 164599) > +++ gcc/java/jcf.h (working copy) > @@ -1,6 +1,6 @@ > /* Utility macros to read Java(TM) .class files and byte codes. > Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, > - 2006, 2007, 2008 Free Software Foundation, Inc. > + 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. > > This file is part of GCC. > > @@ -274,7 +274,6 @@ extern const char *jcf_write_base_direct > > /* Debug macros, for the front end */ > > -extern int quiet_flag; > #ifdef VERBOSE_SKELETON > #undef SOURCE_FRONTEND_DEBUG > #define SOURCE_FRONTEND_DEBUG(X) \ > Index: gcc/java/parse.h > =================================================================== > --- gcc/java/parse.h (revision 164599) > +++ gcc/java/parse.h (working copy) > @@ -1,6 +1,6 @@ > /* Language parser definitions for the GNU compiler for the Java(TM) language. > Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, > - 2005, 2006, 2007 Free Software Foundation, Inc. > + 2005, 2006, 2007, 2010 Free Software Foundation, Inc. > Contributed by Alexandre Petit-Bianco (apbianco@cygnus.com) > > This file is part of GCC. > @@ -28,7 +28,6 @@ The Free Software Foundation is independ > > /* Extern global variable declarations */ > extern struct obstack temporary_obstack; > -extern int quiet_flag; > > #ifdef VERBOSE_SKELETON > #undef SOURCE_FRONTEND_DEBUG > Index: gcc/java/java-tree.h > =================================================================== > --- gcc/java/java-tree.h (revision 164599) > +++ gcc/java/java-tree.h (working copy) > @@ -112,64 +112,11 @@ struct JCF; > /* The virtual offset symbol table. Used by the runtime to fill out > the otable. */ > > -extern int flag_filelist_file; > - > -/* When nonzero, permit the use of the assert keyword. */ > - > -extern int flag_assert; > - > -/* When nonzero, assume all native functions are implemented with > - JNI, not CNI. */ > - > -extern int flag_jni; > - > -/* When nonzero, always check for a non gcj generated classes archive. */ > - > -extern int flag_force_classes_archive_check; > - > /* Resource name. */ > extern const char *resource_name; > > /* Turned to 1 if -Wall was encountered. See lang.c for their meanings. */ > extern int flag_wall; > -extern int flag_redundant; > - > -/* When nonzero, warn when source file is newer than matching class > - file. */ > -extern int flag_newer; > - > -/* When nonzero, call a library routine to do integer divisions. */ > -extern int flag_use_divide_subroutine; > - > -/* When nonzero, use atomic builtins. */ > -extern int flag_use_atomic_builtins; > - > -/* When nonzero, generate code for the Boehm GC. */ > -extern int flag_use_boehm_gc; > - > -/* When nonzero, assume the runtime uses a hash table to map an > - object to its synchronization structure. */ > -extern int flag_hash_synchronization; > - > -/* When nonzero, generate checks for references to NULL. */ > -extern int flag_check_references; > - > -/* Used through STATIC_CLASS_INIT_OPT_P to check whether static > - initialization optimization should be performed. */ > -extern int flag_optimize_sci; > - > -/* Generate instances of Class at runtime. */ > -extern int flag_indirect_classes; > - > -/* When nonzero, use offset tables for virtual method calls > - in order to improve binary compatibility. */ > -extern int flag_indirect_dispatch; > - > -/* When zero, don't generate runtime array store checks. */ > -extern int flag_store_check; > - > -/* When nonzero, generate only a limited set of class meta-data. */ > -extern int flag_reduced_reflection; > > /* The Java .class file that provides main_class; the main input file. */ > extern GTY(()) struct JCF * current_jcf; > Index: gcc/reload.c > =================================================================== > --- gcc/reload.c (revision 164599) > +++ gcc/reload.c (working copy) > @@ -1,6 +1,6 @@ > /* Search an insn for pseudo regs that must be in hard regs and are not. > Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, > - 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 > + 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 > Free Software Foundation, Inc. > > This file is part of GCC. > @@ -5157,7 +5157,7 @@ find_reloads_address (enum machine_mode > if ((regno_ok_for_base_p (REGNO (operand), mode, inner_code, > GET_CODE (addend)) > || operand == frame_pointer_rtx > -#if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM > +#if !HARD_FRAME_POINTER_IS_FRAME_POINTER > || operand == hard_frame_pointer_rtx > #endif > #if FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM > Index: gcc/diagnostic.c > =================================================================== > --- gcc/diagnostic.c (revision 164599) > +++ gcc/diagnostic.c (working copy) > @@ -107,8 +107,8 @@ diagnostic_initialize (diagnostic_contex > context->permissive = false; > context->opt_permissive = 0; > context->fatal_errors = false; > - context->inhibit_warnings = false; > - context->warn_system_headers = false; > + context->dc_inhibit_warnings = false; > + context->dc_warn_system_headers = false; > context->internal_error = NULL; > diagnostic_starter (context) = default_diagnostic_starter; > diagnostic_finalizer (context) = default_diagnostic_finalizer; > Index: gcc/diagnostic.h > =================================================================== > --- gcc/diagnostic.h (revision 164599) > +++ gcc/diagnostic.h (working copy) > @@ -124,10 +124,10 @@ struct diagnostic_context > bool fatal_errors; > > /* True if all warnings should be disabled. */ > - bool inhibit_warnings; > + bool dc_inhibit_warnings; > > /* True if warnings should be given in system headers. */ > - bool warn_system_headers; > + bool dc_warn_system_headers; > > /* This function is called before any message is printed out. It is > responsible for preparing message prefix and such. For example, it > @@ -230,8 +230,8 @@ extern diagnostic_context *global_dc; > > /* Returns nonzero if warnings should be emitted. */ > #define diagnostic_report_warnings_p(DC, LOC) \ > - (!(DC)->inhibit_warnings \ > - && !(in_system_header_at (LOC) && !(DC)->warn_system_headers)) > + (!(DC)->dc_inhibit_warnings \ > + && !(in_system_header_at (LOC) && !(DC)->dc_warn_system_headers)) > > #define report_diagnostic(D) diagnostic_report_diagnostic (global_dc, D) > > Index: gcc/builtins.c > =================================================================== > --- gcc/builtins.c (revision 164599) > +++ gcc/builtins.c (working copy) > @@ -835,7 +835,7 @@ expand_builtin_setjmp_receiver (rtx rece > emit_clobber (hard_frame_pointer_rtx); > } > > -#if ARG_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM > +#if !HARD_FRAME_POINTER_IS_ARG_POINTER > if (fixed_regs[ARG_POINTER_REGNUM]) > { > #ifdef ELIMINABLE_REGS > Index: gcc/df-scan.c > =================================================================== > --- gcc/df-scan.c (revision 164599) > +++ gcc/df-scan.c (working copy) > @@ -3406,7 +3406,7 @@ df_insn_refs_collect (struct df_collecti > regno_reg_rtx[FRAME_POINTER_REGNUM], > NULL, bb, insn_info, > DF_REF_REG_USE, 0); > -#if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM > +#if !HARD_FRAME_POINTER_IS_FRAME_POINTER > df_ref_record (DF_REF_BASE, collection_rec, > regno_reg_rtx[HARD_FRAME_POINTER_REGNUM], > NULL, bb, insn_info, > @@ -3604,7 +3604,7 @@ df_get_regular_block_artificial_uses (bi > reference of the frame pointer. */ > bitmap_set_bit (regular_block_artificial_uses, FRAME_POINTER_REGNUM); > > -#if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM > +#if !HARD_FRAME_POINTER_IS_FRAME_POINTER > bitmap_set_bit (regular_block_artificial_uses, HARD_FRAME_POINTER_REGNUM); > #endif > > @@ -3656,7 +3656,7 @@ df_get_eh_block_artificial_uses (bitmap > if (frame_pointer_needed) > { > bitmap_set_bit (eh_block_artificial_uses, FRAME_POINTER_REGNUM); > -#if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM > +#if !HARD_FRAME_POINTER_IS_FRAME_POINTER > bitmap_set_bit (eh_block_artificial_uses, HARD_FRAME_POINTER_REGNUM); > #endif > } > @@ -3744,7 +3744,7 @@ df_get_entry_block_def_set (bitmap entry > /* Any reference to any pseudo before reload is a potential > reference of the frame pointer. */ > bitmap_set_bit (entry_block_defs, FRAME_POINTER_REGNUM); > -#if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM > +#if !HARD_FRAME_POINTER_IS_FRAME_POINTER > /* If they are different, also mark the hard frame pointer as live. */ > if (!LOCAL_REGNO (HARD_FRAME_POINTER_REGNUM)) > bitmap_set_bit (entry_block_defs, HARD_FRAME_POINTER_REGNUM); > @@ -3877,7 +3877,7 @@ df_get_exit_block_use_set (bitmap exit_b > if ((!reload_completed) || frame_pointer_needed) > { > bitmap_set_bit (exit_block_uses, FRAME_POINTER_REGNUM); > -#if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM > +#if !HARD_FRAME_POINTER_IS_FRAME_POINTER > /* If they are different, also mark the hard frame pointer as live. */ > if (!LOCAL_REGNO (HARD_FRAME_POINTER_REGNUM)) > bitmap_set_bit (exit_block_uses, HARD_FRAME_POINTER_REGNUM); > Index: gcc/dbxout.c > =================================================================== > --- gcc/dbxout.c (revision 164599) > +++ gcc/dbxout.c (working copy) > @@ -3015,7 +3015,7 @@ dbxout_symbol_location (tree decl, tree > || (REG_P (XEXP (home, 0)) > && REGNO (XEXP (home, 0)) != HARD_FRAME_POINTER_REGNUM > && REGNO (XEXP (home, 0)) != STACK_POINTER_REGNUM > -#if ARG_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM > +#if !HARD_FRAME_POINTER_IS_ARG_POINTER > && REGNO (XEXP (home, 0)) != ARG_POINTER_REGNUM > #endif > ))) > @@ -3429,7 +3429,7 @@ dbxout_parms (tree parms) > && REG_P (XEXP (DECL_RTL (parms), 0)) > && REGNO (XEXP (DECL_RTL (parms), 0)) != HARD_FRAME_POINTER_REGNUM > && REGNO (XEXP (DECL_RTL (parms), 0)) != STACK_POINTER_REGNUM > -#if ARG_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM > +#if !HARD_FRAME_POINTER_IS_ARG_POINTER > && REGNO (XEXP (DECL_RTL (parms), 0)) != ARG_POINTER_REGNUM > #endif > ) > Index: gcc/sel-sched.c > =================================================================== > --- gcc/sel-sched.c (revision 164599) > +++ gcc/sel-sched.c (working copy) > @@ -1236,7 +1236,7 @@ mark_unavailable_hard_regs (def_t def, s > frame pointer, or we could not discover its class. */ > if (fixed_regs[regno] > || global_regs[regno] > -#if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM > +#if !HARD_FRAME_POINTER_IS_FRAME_POINTER > || (frame_pointer_needed && regno == HARD_FRAME_POINTER_REGNUM) > #else > || (frame_pointer_needed && regno == FRAME_POINTER_REGNUM) > @@ -1263,7 +1263,7 @@ mark_unavailable_hard_regs (def_t def, s > SET_HARD_REG_BIT (reg_rename_p->unavailable_hard_regs, > FRAME_POINTER_REGNUM + i); > > -#if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM > +#if !HARD_FRAME_POINTER_IS_FRAME_POINTER > for (i = hard_regno_nregs[HARD_FRAME_POINTER_REGNUM][Pmode]; i--;) > SET_HARD_REG_BIT (reg_rename_p->unavailable_hard_regs, > HARD_FRAME_POINTER_REGNUM + i); > Index: gcc/dwarf2out.c > =================================================================== > --- gcc/dwarf2out.c (revision 164599) > +++ gcc/dwarf2out.c (working copy) > @@ -16571,7 +16571,7 @@ rtl_for_decl_location (tree decl) > && (!REG_P (XEXP (rtl, 0)) > || REGNO (XEXP (rtl, 0)) == HARD_FRAME_POINTER_REGNUM > || REGNO (XEXP (rtl, 0)) == STACK_POINTER_REGNUM > -#if ARG_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM > +#if !HARD_FRAME_POINTER_IS_ARG_POINTER > || REGNO (XEXP (rtl, 0)) == ARG_POINTER_REGNUM > #endif > ) > Index: gcc/opts.c > =================================================================== > --- gcc/opts.c (revision 164599) > +++ gcc/opts.c (working copy) > @@ -123,6 +123,11 @@ static enum debug_struct_file debug_stru > static enum debug_struct_file debug_struct_generic[DINFO_USAGE_NUM_ENUMS] > = { DINFO_STRUCT_FILE_ANY, DINFO_STRUCT_FILE_ANY, DINFO_STRUCT_FILE_ANY }; > > +/* Run the second compilation of -fcompare-debug. Not defined using > + Var in common.opt because this is used in Ada code and so must be > + an actual variable not a macro. */ > +int flag_compare_debug; > + > /* Parse the -femit-struct-debug-detailed option value > and set the flag variables. */ > > @@ -1624,7 +1629,7 @@ common_handle_option (const struct cl_de > break; > > case OPT_Wsystem_headers: > - global_dc->warn_system_headers = value; > + global_dc->dc_warn_system_headers = value; > break; > > case OPT_Wunused: > @@ -1689,6 +1694,10 @@ common_handle_option (const struct cl_de > fix_register (arg, 0, 0); > break; > > + case OPT_fcompare_debug_second: > + flag_compare_debug = value; > + break; > + > case OPT_fdbg_cnt_: > dbg_cnt_process_opt (arg); > break; > @@ -2072,7 +2081,7 @@ common_handle_option (const struct cl_de > break; > > case OPT_w: > - global_dc->inhibit_warnings = true; > + global_dc->dc_inhibit_warnings = true; > break; > > case OPT_fuse_linker_plugin: > @@ -2175,11 +2184,11 @@ fast_math_flags_set_p (void) > bool > fast_math_flags_struct_set_p (struct cl_optimization *opt) > { > - return (!opt->flag_trapping_math > - && opt->flag_unsafe_math_optimizations > - && opt->flag_finite_math_only > - && !opt->flag_signed_zeros > - && !opt->flag_errno_math); > + return (!opt->x_flag_trapping_math > + && opt->x_flag_unsafe_math_optimizations > + && opt->x_flag_finite_math_only > + && !opt->x_flag_signed_zeros > + && !opt->x_flag_errno_math); > } > > /* Handle a debug output -g switch. EXTENDED is true or false to support > Index: gcc/optc-gen.awk > =================================================================== > --- gcc/optc-gen.awk (revision 164599) > +++ gcc/optc-gen.awk (working copy) > @@ -85,8 +85,19 @@ print "#endif /* GCC_DRIVER */" > print "" > > have_save = 0; > +print "struct gcc_options global_options =\n{" > for (i = 0; i < n_extra_vars; i++) { > - print extra_vars[i] ";" > + var = extra_vars[i] > + init = extra_vars[i] > + if (var ~ "=" ) { > + sub(".*= *", "", init) > + sub(" *=.*", "", var) > + sub("^.*[ *]", "", var) > + } else { > + init = "0" > + } > + var_seen[var] = 1 > + print " " init ", /* " var " */" > } > for (i = 0; i < n_opts; i++) { > if (flag_set_p("Save", flags[i])) > @@ -96,24 +107,31 @@ for (i = 0; i < n_opts; i++) { > if (name == "") > continue; > > - if (flag_set_p("VarExists", flags[i])) { > - continue; > - } > - else { > - init = opt_args("Init", flags[i]) > - if (init != "") > - init = " = " init; > - else if (name in var_seen) > - continue; > + init = opt_args("Init", flags[i]) > + if (init != "") { > + if (name in var_init && var_init[name] != init) > + print "#error multiple initializers for " name > + var_init[name] = init > } > +} > +for (i = 0; i < n_opts; i++) { > + name = var_name(flags[i]); > + if (name == "") > + continue; > + > + if (name in var_seen) > + continue; > + > + if (name in var_init) > + init = var_init[name] > + else > + init = "0" > > - print "/* Set by -" opts[i] "." > - print " " help[i] " */" > - print var_type(flags[i]) name init ";" > - print "" > + print " " init ", /* " name " */" > > var_seen[name] = 1; > } > +print "};" > > print "" > print "/* Local state variables. */" > @@ -332,19 +350,19 @@ for (i = 0; i < n_opt_char; i++) { > > print ""; > for (i = 0; i < n_opt_other; i++) { > - print " ptr->" var_opt_other[i] " = " var_opt_other[i] ";"; > + print " ptr->x_" var_opt_other[i] " = " var_opt_other[i] ";"; > } > > for (i = 0; i < n_opt_int; i++) { > - print " ptr->" var_opt_int[i] " = " var_opt_int[i] ";"; > + print " ptr->x_" var_opt_int[i] " = " var_opt_int[i] ";"; > } > > for (i = 0; i < n_opt_short; i++) { > - print " ptr->" var_opt_short[i] " = " var_opt_short[i] ";"; > + print " ptr->x_" var_opt_short[i] " = " var_opt_short[i] ";"; > } > > for (i = 0; i < n_opt_char; i++) { > - print " ptr->" var_opt_char[i] " = " var_opt_char[i] ";"; > + print " ptr->x_" var_opt_char[i] " = " var_opt_char[i] ";"; > } > > print "}"; > @@ -356,19 +374,19 @@ print "cl_optimization_restore (struct c > print "{"; > > for (i = 0; i < n_opt_other; i++) { > - print " " var_opt_other[i] " = ptr->" var_opt_other[i] ";"; > + print " " var_opt_other[i] " = ptr->x_" var_opt_other[i] ";"; > } > > for (i = 0; i < n_opt_int; i++) { > - print " " var_opt_int[i] " = ptr->" var_opt_int[i] ";"; > + print " " var_opt_int[i] " = ptr->x_" var_opt_int[i] ";"; > } > > for (i = 0; i < n_opt_short; i++) { > - print " " var_opt_short[i] " = ptr->" var_opt_short[i] ";"; > + print " " var_opt_short[i] " = ptr->x_" var_opt_short[i] ";"; > } > > for (i = 0; i < n_opt_char; i++) { > - print " " var_opt_char[i] " = ptr->" var_opt_char[i] ";"; > + print " " var_opt_char[i] " = ptr->x_" var_opt_char[i] ";"; > } > > print " targetm.override_options_after_change ();"; > @@ -384,38 +402,38 @@ print "{"; > > print " fputs (\"\\n\", file);"; > for (i = 0; i < n_opt_other; i++) { > - print " if (ptr->" var_opt_other[i] ")"; > + print " if (ptr->x_" var_opt_other[i] ")"; > print " fprintf (file, \"%*s%s (%#lx)\\n\","; > print " indent_to, \"\","; > print " \"" var_opt_other[i] "\","; > - print " (unsigned long)ptr->" var_opt_other[i] ");"; > + print " (unsigned long)ptr->x_" var_opt_other[i] ");"; > print ""; > } > > for (i = 0; i < n_opt_int; i++) { > - print " if (ptr->" var_opt_int[i] ")"; > + print " if (ptr->x_" var_opt_int[i] ")"; > print " fprintf (file, \"%*s%s (%#x)\\n\","; > print " indent_to, \"\","; > print " \"" var_opt_int[i] "\","; > - print " ptr->" var_opt_int[i] ");"; > + print " ptr->x_" var_opt_int[i] ");"; > print ""; > } > > for (i = 0; i < n_opt_short; i++) { > - print " if (ptr->" var_opt_short[i] ")"; > + print " if (ptr->x_" var_opt_short[i] ")"; > print " fprintf (file, \"%*s%s (%#x)\\n\","; > print " indent_to, \"\","; > print " \"" var_opt_short[i] "\","; > - print " ptr->" var_opt_short[i] ");"; > + print " ptr->x_" var_opt_short[i] ");"; > print ""; > } > > for (i = 0; i < n_opt_char; i++) { > - print " if (ptr->" var_opt_char[i] ")"; > + print " if (ptr->x_" var_opt_char[i] ")"; > print " fprintf (file, \"%*s%s (%#x)\\n\","; > print " indent_to, \"\","; > print " \"" var_opt_char[i] "\","; > - print " ptr->" var_opt_char[i] ");"; > + print " ptr->x_" var_opt_char[i] ");"; > print ""; > } > > @@ -482,19 +500,19 @@ print " targetm.target_option.save (p > print ""; > > for (i = 0; i < n_target_other; i++) { > - print " ptr->" var_target_other[i] " = " var_target_other[i] ";"; > + print " ptr->x_" var_target_other[i] " = " var_target_other[i] ";"; > } > > for (i = 0; i < n_target_int; i++) { > - print " ptr->" var_target_int[i] " = " var_target_int[i] ";"; > + print " ptr->x_" var_target_int[i] " = " var_target_int[i] ";"; > } > > for (i = 0; i < n_target_short; i++) { > - print " ptr->" var_target_short[i] " = " var_target_short[i] ";"; > + print " ptr->x_" var_target_short[i] " = " var_target_short[i] ";"; > } > > for (i = 0; i < n_target_char; i++) { > - print " ptr->" var_target_char[i] " = " var_target_char[i] ";"; > + print " ptr->x_" var_target_char[i] " = " var_target_char[i] ";"; > } > > print "}"; > @@ -506,19 +524,19 @@ print "cl_target_option_restore (struct > print "{"; > > for (i = 0; i < n_target_other; i++) { > - print " " var_target_other[i] " = ptr->" var_target_other[i] ";"; > + print " " var_target_other[i] " = ptr->x_" var_target_other[i] ";"; > } > > for (i = 0; i < n_target_int; i++) { > - print " " var_target_int[i] " = ptr->" var_target_int[i] ";"; > + print " " var_target_int[i] " = ptr->x_" var_target_int[i] ";"; > } > > for (i = 0; i < n_target_short; i++) { > - print " " var_target_short[i] " = ptr->" var_target_short[i] ";"; > + print " " var_target_short[i] " = ptr->x_" var_target_short[i] ";"; > } > > for (i = 0; i < n_target_char; i++) { > - print " " var_target_char[i] " = ptr->" var_target_char[i] ";"; > + print " " var_target_char[i] " = ptr->x_" var_target_char[i] ";"; > } > > # This must occur after the normal variables in case the code depends on those > @@ -539,38 +557,38 @@ print "{"; > > print " fputs (\"\\n\", file);"; > for (i = 0; i < n_target_other; i++) { > - print " if (ptr->" var_target_other[i] ")"; > + print " if (ptr->x_" var_target_other[i] ")"; > print " fprintf (file, \"%*s%s (%#lx)\\n\","; > print " indent, \"\","; > print " \"" var_target_other[i] "\","; > - print " (unsigned long)ptr->" var_target_other[i] ");"; > + print " (unsigned long)ptr->x_" var_target_other[i] ");"; > print ""; > } > > for (i = 0; i < n_target_int; i++) { > - print " if (ptr->" var_target_int[i] ")"; > + print " if (ptr->x_" var_target_int[i] ")"; > print " fprintf (file, \"%*s%s (%#x)\\n\","; > print " indent, \"\","; > print " \"" var_target_int[i] "\","; > - print " ptr->" var_target_int[i] ");"; > + print " ptr->x_" var_target_int[i] ");"; > print ""; > } > > for (i = 0; i < n_target_short; i++) { > - print " if (ptr->" var_target_short[i] ")"; > + print " if (ptr->x_" var_target_short[i] ")"; > print " fprintf (file, \"%*s%s (%#x)\\n\","; > print " indent, \"\","; > print " \"" var_target_short[i] "\","; > - print " ptr->" var_target_short[i] ");"; > + print " ptr->x_" var_target_short[i] ");"; > print ""; > } > > for (i = 0; i < n_target_char; i++) { > - print " if (ptr->" var_target_char[i] ")"; > + print " if (ptr->x_" var_target_char[i] ")"; > print " fprintf (file, \"%*s%s (%#x)\\n\","; > print " indent, \"\","; > print " \"" var_target_char[i] "\","; > - print " ptr->" var_target_char[i] ");"; > + print " ptr->x_" var_target_char[i] ");"; > print ""; > } > > Index: gcc/fortran/intrinsic.c > =================================================================== > --- gcc/fortran/intrinsic.c (revision 164599) > +++ gcc/fortran/intrinsic.c (working copy) > @@ -4271,7 +4271,7 @@ gfc_convert_type_warn (gfc_expr *expr, g > gfc_warning_now ("Conversion from %s to %s at %L", > gfc_typename (&from_ts), gfc_typename (ts), > &expr->where); > - else if (gfc_option.warn_conversion > + else if (gfc_option.gfc_warn_conversion > && from_ts.kind > ts->kind) > gfc_warning_now ("Possible change of value in conversion " > "from %s to %s at %L", gfc_typename (&from_ts), > @@ -4284,7 +4284,7 @@ gfc_convert_type_warn (gfc_expr *expr, g > /* Conversion from REAL/COMPLEX to INTEGER or COMPLEX to REAL > usually comes with a loss of information, regardless of kinds. */ > if (gfc_option.warn_conversion_extra > - || gfc_option.warn_conversion) > + || gfc_option.gfc_warn_conversion) > gfc_warning_now ("Possible change of value in conversion " > "from %s to %s at %L", gfc_typename (&from_ts), > gfc_typename (ts), &expr->where); > @@ -4293,7 +4293,7 @@ gfc_convert_type_warn (gfc_expr *expr, g > { > /* If HOLLERITH is involved, all bets are off. */ > if (gfc_option.warn_conversion_extra > - || gfc_option.warn_conversion) > + || gfc_option.gfc_warn_conversion) > gfc_warning_now ("Conversion from %s to %s at %L", > gfc_typename (&from_ts), gfc_typename (ts), > &expr->where); > Index: gcc/fortran/cpp.c > =================================================================== > --- gcc/fortran/cpp.c (revision 164599) > +++ gcc/fortran/cpp.c (working copy) > @@ -176,7 +176,7 @@ cpp_define_builtins (cpp_reader *pfile) > cpp_define (pfile, "__GFORTRAN__=1"); > cpp_define (pfile, "_LANGUAGE_FORTRAN=1"); > > - if (gfc_option.flag_openmp) > + if (gfc_option.gfc_flag_openmp) > cpp_define (pfile, "_OPENMP=200805"); > > > @@ -526,7 +526,7 @@ gfc_cpp_post_options (void) > cpp_option->traditional = 1; > cpp_option->cplusplus_comments = 0; > > - cpp_option->pedantic = pedantic; > + cpp_option->cpp_pedantic = pedantic; > > cpp_option->dollars_in_ident = gfc_option.flag_dollar_ok; > cpp_option->discard_comments = gfc_cpp_option.discard_comments; > @@ -1075,13 +1075,13 @@ cb_cpp_error (cpp_reader *pfile ATTRIBUT > { > diagnostic_info diagnostic; > diagnostic_t dlevel; > - bool save_warn_system_headers = global_dc->warn_system_headers; > + bool save_warn_system_headers = global_dc->dc_warn_system_headers; > bool ret; > > switch (level) > { > case CPP_DL_WARNING_SYSHDR: > - global_dc->warn_system_headers = 1; > + global_dc->dc_warn_system_headers = 1; > /* Fall through. */ > case CPP_DL_WARNING: > dlevel = DK_WARNING; > @@ -1112,7 +1112,7 @@ cb_cpp_error (cpp_reader *pfile ATTRIBUT > diagnostic_override_option_index (&diagnostic, OPT_Wcpp); > ret = report_diagnostic (&diagnostic); > if (level == CPP_DL_WARNING_SYSHDR) > - global_dc->warn_system_headers = save_warn_system_headers; > + global_dc->dc_warn_system_headers = save_warn_system_headers; > return ret; > } > > Index: gcc/fortran/gfortran.h > =================================================================== > --- gcc/fortran/gfortran.h (revision 164599) > +++ gcc/fortran/gfortran.h (working copy) > @@ -2182,7 +2182,7 @@ typedef struct > > int warn_aliasing; > int warn_ampersand; > - int warn_conversion; > + int gfc_warn_conversion; > int warn_conversion_extra; > int warn_implicit_interface; > int warn_implicit_procedure; > @@ -2222,7 +2222,7 @@ typedef struct > int blas_matmul_limit; > int flag_cray_pointer; > int flag_d_lines; > - int flag_openmp; > + int gfc_flag_openmp; > int flag_sign_zero; > int flag_module_private; > int flag_recursive; > Index: gcc/fortran/scanner.c > =================================================================== > --- gcc/fortran/scanner.c (revision 164599) > +++ gcc/fortran/scanner.c (working copy) > @@ -1,6 +1,6 @@ > /* Character scanner. > - Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 > - Free Software Foundation, Inc. > + Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, > + 2010 Free Software Foundation, Inc. > Contributed by Andy Vaught > > This file is part of GCC. > @@ -76,8 +76,6 @@ const char *gfc_source_file; > static FILE *gfc_src_file; > static gfc_char_t *gfc_src_preprocessor_lines[2]; > > -extern int pedantic; > - > static struct gfc_file_change > { > const char *filename; > @@ -747,7 +745,7 @@ skip_free_comments (void) > 2) handle OpenMP conditional compilation, where > !$ should be treated as 2 spaces (for initial lines > only if followed by space). */ > - if (gfc_option.flag_openmp && at_bol) > + if (gfc_option.gfc_flag_openmp && at_bol) > { > locus old_loc = gfc_current_locus; > if (next_char () == '$') > @@ -873,7 +871,7 @@ skip_fixed_comments (void) > && continue_line < gfc_linebuf_linenum (gfc_current_locus.lb)) > continue_line = gfc_linebuf_linenum (gfc_current_locus.lb); > > - if (gfc_option.flag_openmp) > + if (gfc_option.gfc_flag_openmp) > { > if (next_char () == '$') > { > @@ -1814,7 +1812,7 @@ include_line (gfc_char_t *line) > > c = line; > > - if (gfc_option.flag_openmp) > + if (gfc_option.gfc_flag_openmp) > { > if (gfc_current_form == FORM_FREE) > { > Index: gcc/fortran/f95-lang.c > =================================================================== > --- gcc/fortran/f95-lang.c (revision 164599) > +++ gcc/fortran/f95-lang.c (working copy) > @@ -1087,7 +1087,7 @@ gfc_init_builtin_functions (void) > #include "../sync-builtins.def" > #undef DEF_SYNC_BUILTIN > > - if (gfc_option.flag_openmp || flag_tree_parallelize_loops) > + if (gfc_option.gfc_flag_openmp || flag_tree_parallelize_loops) > { > #undef DEF_GOMP_BUILTIN > #define DEF_GOMP_BUILTIN(code, name, type, attr) \ > Index: gcc/fortran/trans-decl.c > =================================================================== > --- gcc/fortran/trans-decl.c (revision 164599) > +++ gcc/fortran/trans-decl.c (working copy) > @@ -4681,7 +4681,7 @@ gfc_generate_function_code (gfc_namespac > /* Reset recursion-check variable. */ > if ((gfc_option.rtcheck & GFC_RTCHECK_RECURSION) > && !is_recursive > - && !gfc_option.flag_openmp > + && !gfc_option.gfc_flag_openmp > && recurcheckvar != NULL_TREE) > { > gfc_add_modify (&cleanup, recurcheckvar, boolean_false_node); > Index: gcc/fortran/parse.c > =================================================================== > --- gcc/fortran/parse.c (revision 164599) > +++ gcc/fortran/parse.c (working copy) > @@ -693,7 +693,7 @@ next_free (void) > return decode_gcc_attribute (); > > } > - else if (c == '$' && gfc_option.flag_openmp) > + else if (c == '$' && gfc_option.gfc_flag_openmp) > { > int i; > > @@ -780,7 +780,7 @@ next_fixed (void) > > return decode_gcc_attribute (); > } > - else if (c == '$' && gfc_option.flag_openmp) > + else if (c == '$' && gfc_option.gfc_flag_openmp) > { > for (i = 0; i < 4; i++, c = gfc_next_char_literal (0)) > gcc_assert ((char) gfc_wide_tolower (c) == "$omp"[i]); > Index: gcc/fortran/options.c > =================================================================== > --- gcc/fortran/options.c (revision 164599) > +++ gcc/fortran/options.c (working copy) > @@ -87,7 +87,7 @@ gfc_init_options (unsigned int decoded_o > gfc_option.warn_ampersand = 0; > gfc_option.warn_character_truncation = 0; > gfc_option.warn_array_temp = 0; > - gfc_option.warn_conversion = 0; > + gfc_option.gfc_warn_conversion = 0; > gfc_option.warn_conversion_extra = 0; > gfc_option.warn_implicit_interface = 0; > gfc_option.warn_line_truncation = 0; > @@ -128,7 +128,7 @@ gfc_init_options (unsigned int decoded_o > gfc_option.blas_matmul_limit = 30; > gfc_option.flag_cray_pointer = 0; > gfc_option.flag_d_lines = -1; > - gfc_option.flag_openmp = 0; > + gfc_option.gfc_flag_openmp = 0; > gfc_option.flag_sign_zero = 1; > gfc_option.flag_recursive = 0; > gfc_option.flag_init_integer = GFC_INIT_INTEGER_OFF; > @@ -356,7 +356,7 @@ gfc_post_options (const char **pfilename > gfc_option.flag_max_stack_var_size); > else if (!gfc_option.flag_automatic && gfc_option.flag_recursive) > gfc_warning_now ("Flag -fno-automatic overwrites -frecursive"); > - else if (!gfc_option.flag_automatic && gfc_option.flag_openmp) > + else if (!gfc_option.flag_automatic && gfc_option.gfc_flag_openmp) > gfc_warning_now ("Flag -fno-automatic overwrites -frecursive implied by " > "-fopenmp"); > else if (gfc_option.flag_max_stack_var_size != -2 > @@ -364,7 +364,7 @@ gfc_post_options (const char **pfilename > gfc_warning_now ("Flag -frecursive overwrites -fmax-stack-var-size=%d", > gfc_option.flag_max_stack_var_size); > else if (gfc_option.flag_max_stack_var_size != -2 > - && gfc_option.flag_openmp) > + && gfc_option.gfc_flag_openmp) > gfc_warning_now ("Flag -fmax-stack-var-size=%d overwrites -frecursive " > "implied by -fopenmp", > gfc_option.flag_max_stack_var_size); > @@ -374,7 +374,7 @@ gfc_post_options (const char **pfilename > gfc_option.flag_max_stack_var_size = -1; > > /* Implied -frecursive; implemented as -fmax-stack-var-size=-1. */ > - if (gfc_option.flag_max_stack_var_size == -2 && gfc_option.flag_openmp > + if (gfc_option.flag_max_stack_var_size == -2 && gfc_option.gfc_flag_openmp > && gfc_option.flag_automatic) > { > gfc_option.flag_recursive = 1; > @@ -418,7 +418,7 @@ set_Wall (int setting) > { > gfc_option.warn_aliasing = setting; > gfc_option.warn_ampersand = setting; > - gfc_option.warn_conversion = setting; > + gfc_option.gfc_warn_conversion = setting; > gfc_option.warn_line_truncation = setting; > gfc_option.warn_surprising = setting; > gfc_option.warn_tabs = !setting; > @@ -580,7 +580,7 @@ gfc_handle_option (size_t scode, const c > break; > > case OPT_Wconversion: > - gfc_option.warn_conversion = value; > + gfc_option.gfc_warn_conversion = value; > break; > > case OPT_Wconversion_extra: > @@ -706,7 +706,7 @@ gfc_handle_option (size_t scode, const c > break; > > case OPT_fopenmp: > - gfc_option.flag_openmp = value; > + gfc_option.gfc_flag_openmp = value; > break; > > case OPT_ffree_line_length_none: > Index: gcc/alias.c > =================================================================== > --- gcc/alias.c (revision 164599) > +++ gcc/alias.c (working copy) > @@ -2688,7 +2688,7 @@ init_alias_target (void) > = gen_rtx_ADDRESS (Pmode, arg_pointer_rtx); > static_reg_base_value[FRAME_POINTER_REGNUM] > = gen_rtx_ADDRESS (Pmode, frame_pointer_rtx); > -#if HARD_FRAME_POINTER_REGNUM != FRAME_POINTER_REGNUM > +#if !HARD_FRAME_POINTER_IS_FRAME_POINTER > static_reg_base_value[HARD_FRAME_POINTER_REGNUM] > = gen_rtx_ADDRESS (Pmode, hard_frame_pointer_rtx); > #endif > Index: gcc/emit-rtl.c > =================================================================== > --- gcc/emit-rtl.c (revision 164599) > +++ gcc/emit-rtl.c (working copy) > @@ -589,12 +589,12 @@ gen_rtx_REG (enum machine_mode mode, uns > if (regno == FRAME_POINTER_REGNUM > && (!reload_completed || frame_pointer_needed)) > return frame_pointer_rtx; > -#if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM > +#if !HARD_FRAME_POINTER_IS_FRAME_POINTER > if (regno == HARD_FRAME_POINTER_REGNUM > && (!reload_completed || frame_pointer_needed)) > return hard_frame_pointer_rtx; > #endif > -#if FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM && HARD_FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM > +#if FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM && !HARD_FRAME_POINTER_IS_ARG_POINTER > if (regno == ARG_POINTER_REGNUM) > return arg_pointer_rtx; > #endif > Index: gcc/opth-gen.awk > =================================================================== > --- gcc/opth-gen.awk (revision 164599) > +++ gcc/opth-gen.awk (working copy) > @@ -75,10 +75,25 @@ print "" > > have_save = 0; > > +print "#ifndef GENERATOR_FILE" > +print "struct gcc_options\n{" > +print "#endif" > + > for (i = 0; i < n_extra_vars; i++) { > var = extra_vars[i] > sub(" *=.*", "", var) > - print "extern " var ";" > + orig_var = var > + name = var > + type = var > + sub("^.*[ *]", "", name) > + sub(" *" name "$", "", type) > + var_seen[name] = 1 > + print "#ifdef GENERATOR_FILE" > + print "extern " orig_var ";" > + print "#else" > + print " " type " x_" name ";" > + print "#define " name " global_options.x_" name > + print "#endif" > } > > for (i = 0; i < n_opts; i++) { > @@ -93,8 +108,17 @@ for (i = 0; i < n_opts; i++) { > continue; > > var_seen[name] = 1; > + print "#ifdef GENERATOR_FILE" > print "extern " var_type(flags[i]) name ";" > + print "#else" > + print " " var_type(flags[i]) "x_" name ";" > + print "#define " name " global_options.x_" name > + print "#endif" > } > +print "#ifndef GENERATOR_FILE" > +print "};" > +print "extern struct gcc_options global_options;" > +print "#endif" > print "" > > # All of the optimization switches gathered together so they can be saved and restored. > @@ -114,8 +138,8 @@ n_opt_char = 2; > n_opt_short = 0; > n_opt_int = 0; > n_opt_other = 0; > -var_opt_char[0] = "unsigned char optimize"; > -var_opt_char[1] = "unsigned char optimize_size"; > +var_opt_char[0] = "unsigned char x_optimize"; > +var_opt_char[1] = "unsigned char x_optimize_size"; > > for (i = 0; i < n_opts; i++) { > if (flag_set_p("Optimization", flags[i])) { > @@ -129,16 +153,16 @@ for (i = 0; i < n_opts; i++) { > var_opt_seen[name]++; > otype = var_type_struct(flags[i]); > if (otype ~ "^((un)?signed +)?int *$") > - var_opt_int[n_opt_int++] = otype name; > + var_opt_int[n_opt_int++] = otype "x_" name; > > else if (otype ~ "^((un)?signed +)?short *$") > - var_opt_short[n_opt_short++] = otype name; > + var_opt_short[n_opt_short++] = otype "x_" name; > > else if (otype ~ "^((un)?signed +)?char *$") > - var_opt_char[n_opt_char++] = otype name; > + var_opt_char[n_opt_char++] = otype "x_" name; > > else > - var_opt_other[n_opt_other++] = otype name; > + var_opt_other[n_opt_other++] = otype "x_" name; > } > } > > @@ -198,20 +222,20 @@ if (have_save) { > var_save_seen[name]++; > otype = var_type_struct(flags[i]) > if (otype ~ "^((un)?signed +)?int *$") > - var_target_int[n_target_int++] = otype name; > + var_target_int[n_target_int++] = otype "x_" name; > > else if (otype ~ "^((un)?signed +)?short *$") > - var_target_short[n_target_short++] = otype name; > + var_target_short[n_target_short++] = otype "x_" name; > > else if (otype ~ "^((un)?signed +)?char *$") > - var_target_char[n_target_char++] = otype name; > + var_target_char[n_target_char++] = otype "x_" name; > > else > - var_target_other[n_target_other++] = otype name; > + var_target_other[n_target_other++] = otype "x_" name; > } > } > } else { > - var_target_int[n_target_int++] = "int target_flags"; > + var_target_int[n_target_int++] = "int x_target_flags"; > } > > for (i = 0; i < n_target_other; i++) { > Index: gcc/common.opt > =================================================================== > --- gcc/common.opt (revision 164599) > +++ gcc/common.opt (working copy) > @@ -647,7 +647,7 @@ Common Driver JoinedOrMissing RejectNega > -fcompare-debug[=<opts>] Compile with and without e.g. -gtoggle, and compare the final-insns dump > > fcompare-debug-second > -Common Driver RejectNegative Var(flag_compare_debug) > +Common Driver RejectNegative > Run only the second compilation of -fcompare-debug > > fconserve-stack > Index: gcc/ira.c > =================================================================== > --- gcc/ira.c (revision 164599) > +++ gcc/ira.c (working copy) > @@ -1389,7 +1389,7 @@ ira_setup_eliminable_regset (void) > else > df_set_regs_ever_live (eliminables[i].from, true); > } > -#if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM > +#if !HARD_FRAME_POINTER_IS_FRAME_POINTER > if (!TEST_HARD_REG_BIT (crtl->asm_clobbers, HARD_FRAME_POINTER_REGNUM)) > { > SET_HARD_REG_BIT (eliminable_regset, HARD_FRAME_POINTER_REGNUM); > Index: gcc/rtl.h > =================================================================== > --- gcc/rtl.h (revision 164599) > +++ gcc/rtl.h (working copy) > @@ -1980,6 +1980,16 @@ extern GTY(()) rtx const_tiny_rtx[3][(in > #define HARD_FRAME_POINTER_REGNUM FRAME_POINTER_REGNUM > #endif > > +#ifndef HARD_FRAME_POINTER_IS_FRAME_POINTER > +#define HARD_FRAME_POINTER_IS_FRAME_POINTER \ > + (HARD_FRAME_POINTER_REGNUM == FRAME_POINTER_REGNUM) > +#endif > + > +#ifndef HARD_FRAME_POINTER_IS_ARG_POINTER > +#define HARD_FRAME_POINTER_IS_ARG_POINTER \ > + (HARD_FRAME_POINTER_REGNUM == ARG_POINTER_REGNUM) > +#endif > + > /* Index labels for global_rtl. */ > enum global_rtl_index > { > @@ -1993,13 +2003,13 @@ enum global_rtl_index > #if FRAME_POINTER_REGNUM == ARG_POINTER_REGNUM > GR_ARG_POINTER = GR_FRAME_POINTER, > #endif > -#if HARD_FRAME_POINTER_REGNUM == FRAME_POINTER_REGNUM > +#if HARD_FRAME_POINTER_IS_FRAME_POINTER > GR_HARD_FRAME_POINTER = GR_FRAME_POINTER, > #else > GR_HARD_FRAME_POINTER, > #endif > #if FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM > -#if HARD_FRAME_POINTER_REGNUM == ARG_POINTER_REGNUM > +#if HARD_FRAME_POINTER_IS_ARG_POINTER > GR_ARG_POINTER = GR_HARD_FRAME_POINTER, > #else > GR_ARG_POINTER, > Index: gcc/combine.c > =================================================================== > --- gcc/combine.c (revision 164599) > +++ gcc/combine.c (working copy) > @@ -962,7 +962,7 @@ create_log_links (void) > /* Do not make the log link for frame pointer. */ > if ((regno == FRAME_POINTER_REGNUM > && (! reload_completed || frame_pointer_needed)) > -#if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM > +#if !HARD_FRAME_POINTER_IS_FRAME_POINTER > || (regno == HARD_FRAME_POINTER_REGNUM > && (! reload_completed || frame_pointer_needed)) > #endif > @@ -2049,7 +2049,7 @@ combinable_i3pat (rtx i3, rtx *loc, rtx > && REG_P (subdest) > && reg_referenced_p (subdest, PATTERN (i3)) > && REGNO (subdest) != FRAME_POINTER_REGNUM > -#if HARD_FRAME_POINTER_REGNUM != FRAME_POINTER_REGNUM > +#if !HARD_FRAME_POINTER_IS_FRAME_POINTER > && REGNO (subdest) != HARD_FRAME_POINTER_REGNUM > #endif > #if ARG_POINTER_REGNUM != FRAME_POINTER_REGNUM > @@ -12802,7 +12802,7 @@ mark_used_regs_combine (rtx x) > { > /* None of this applies to the stack, frame or arg pointers. */ > if (regno == STACK_POINTER_REGNUM > -#if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM > +#if !HARD_FRAME_POINTER_IS_FRAME_POINTER > || regno == HARD_FRAME_POINTER_REGNUM > #endif > #if FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM > Index: gcc/resource.c > =================================================================== > --- gcc/resource.c (revision 164599) > +++ gcc/resource.c (working copy) > @@ -1,6 +1,6 @@ > /* Definitions for computing resource usage of specific insns. > Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, > - 2009 Free Software Foundation, Inc. > + 2009, 2010 Free Software Foundation, Inc. > > This file is part of GCC. > > @@ -335,7 +335,7 @@ mark_referenced_resources (rtx x, struct > if (frame_pointer_needed) > { > SET_HARD_REG_BIT (res->regs, FRAME_POINTER_REGNUM); > -#if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM > +#if !HARD_FRAME_POINTER_IS_FRAME_POINTER > SET_HARD_REG_BIT (res->regs, HARD_FRAME_POINTER_REGNUM); > #endif > } > @@ -1148,7 +1148,7 @@ init_resource_info (rtx epilogue_insn) > if (frame_pointer_needed) > { > SET_HARD_REG_BIT (end_of_function_needs.regs, FRAME_POINTER_REGNUM); > -#if HARD_FRAME_POINTER_REGNUM != FRAME_POINTER_REGNUM > +#if !HARD_FRAME_POINTER_IS_FRAME_POINTER > SET_HARD_REG_BIT (end_of_function_needs.regs, HARD_FRAME_POINTER_REGNUM); > #endif > if (! EXIT_IGNORE_STACK > Index: gcc/reginfo.c > =================================================================== > --- gcc/reginfo.c (revision 164599) > +++ gcc/reginfo.c (working copy) > @@ -1,7 +1,7 @@ > /* Compute different info about registers. > Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996 > 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, > - 2009 Free Software Foundation, Inc. > + 2009, 2010 Free Software Foundation, Inc. > > This file is part of GCC. > > @@ -487,7 +487,7 @@ init_reg_sets_1 (void) > } > else if (i == FRAME_POINTER_REGNUM) > ; > -#if HARD_FRAME_POINTER_REGNUM != FRAME_POINTER_REGNUM > +#if !HARD_FRAME_POINTER_IS_FRAME_POINTER > else if (i == HARD_FRAME_POINTER_REGNUM) > ; > #endif > Index: gcc/c-parser.c > =================================================================== > --- gcc/c-parser.c (revision 164599) > +++ gcc/c-parser.c (working copy) > @@ -861,11 +861,11 @@ disable_extension_diagnostics (void) > | (flag_iso << 3) > | (warn_long_long << 4) > | (warn_cxx_compat << 5)); > - cpp_opts->pedantic = pedantic = 0; > + cpp_opts->cpp_pedantic = pedantic = 0; > warn_pointer_arith = 0; > - cpp_opts->warn_traditional = warn_traditional = 0; > + cpp_opts->cpp_warn_traditional = warn_traditional = 0; > flag_iso = 0; > - cpp_opts->warn_long_long = warn_long_long = 0; > + cpp_opts->cpp_warn_long_long = warn_long_long = 0; > warn_cxx_compat = 0; > return ret; > } > @@ -876,11 +876,11 @@ disable_extension_diagnostics (void) > static inline void > restore_extension_diagnostics (int flags) > { > - cpp_opts->pedantic = pedantic = flags & 1; > + cpp_opts->cpp_pedantic = pedantic = flags & 1; > warn_pointer_arith = (flags >> 1) & 1; > - cpp_opts->warn_traditional = warn_traditional = (flags >> 2) & 1; > + cpp_opts->cpp_warn_traditional = warn_traditional = (flags >> 2) & 1; > flag_iso = (flags >> 3) & 1; > - cpp_opts->warn_long_long = warn_long_long = (flags >> 4) & 1; > + cpp_opts->cpp_warn_long_long = warn_long_long = (flags >> 4) & 1; > warn_cxx_compat = (flags >> 5) & 1; > } > > Index: gcc/config/alpha/alpha.h > =================================================================== > --- gcc/config/alpha/alpha.h (revision 164599) > +++ gcc/config/alpha/alpha.h (working copy) > @@ -144,8 +144,6 @@ enum alpha_fp_trap_mode > ALPHA_FPTM_SUI /* Software completion, w/underflow & inexact traps */ > }; > > -extern int target_flags; > - > extern enum alpha_trap_precision alpha_tp; > extern enum alpha_fp_rounding_mode alpha_fprm; > extern enum alpha_fp_trap_mode alpha_fptm; > Index: gcc/config/s390/s390.h > =================================================================== > --- gcc/config/s390/s390.h (revision 164599) > +++ gcc/config/s390/s390.h (working copy) > @@ -869,8 +869,6 @@ do { \ > > /* Position independent code. */ > > -extern int flag_pic; > - > #define PIC_OFFSET_TABLE_REGNUM (flag_pic ? 12 : INVALID_REGNUM) > > #define LEGITIMATE_PIC_OPERAND_P(X) legitimate_pic_operand_p (X) > Index: gcc/config/spu/spu.h > =================================================================== > --- gcc/config/spu/spu.h (revision 164599) > +++ gcc/config/spu/spu.h (working copy) > @@ -24,9 +24,6 @@ > > #define INIT_EXPANDERS spu_init_expanders() > > -extern int target_flags; > -extern const char *spu_fixed_range_string; > - > /* Which processor to generate code or schedule for. */ > enum processor_type > { > Index: gcc/config/mep/mep.h > =================================================================== > --- gcc/config/mep/mep.h (revision 164599) > +++ gcc/config/mep/mep.h (working copy) > @@ -108,8 +108,6 @@ crtbegin.o%s" > } \ > while (0) > > -extern int target_flags; > - > /* Controlled by MeP-Integrator. */ > #define TARGET_H1 0 > > Index: gcc/config/i386/i386.h > =================================================================== > --- gcc/config/i386/i386.h (revision 164599) > +++ gcc/config/i386/i386.h (working copy) > @@ -447,8 +447,6 @@ extern int x86_prefetch_sse; > #define TARGET_ANY_GNU_TLS (TARGET_GNU_TLS || TARGET_GNU2_TLS) > #define TARGET_SUN_TLS 0 > > -extern int ix86_isa_flags; > - > #ifndef TARGET_64BIT_DEFAULT > #define TARGET_64BIT_DEFAULT 0 > #endif > Index: gcc/config/i386/i386-c.c > =================================================================== > --- gcc/config/i386/i386-c.c (revision 164599) > +++ gcc/config/i386/i386-c.c (working copy) > @@ -1,5 +1,5 @@ > /* Subroutines used for macro/preprocessor support on the ia-32. > - Copyright (C) 2008, 2009 > + Copyright (C) 2008, 2009, 2010 > Free Software Foundation, Inc. > > This file is part of GCC. > @@ -297,8 +297,8 @@ ix86_pragma_target_parse (tree args, tre > /* Figure out the previous/current isa, arch, tune and the differences. */ > prev_opt = TREE_TARGET_OPTION (prev_tree); > cur_opt = TREE_TARGET_OPTION (cur_tree); > - prev_isa = prev_opt->ix86_isa_flags; > - cur_isa = cur_opt->ix86_isa_flags; > + prev_isa = prev_opt->x_ix86_isa_flags; > + cur_isa = cur_opt->x_ix86_isa_flags; > diff_isa = (prev_isa ^ cur_isa); > prev_arch = (enum processor_type) prev_opt->arch; > prev_tune = (enum processor_type) prev_opt->tune; > Index: gcc/config/i386/i386.c > =================================================================== > --- gcc/config/i386/i386.c (revision 164599) > +++ gcc/config/i386/i386.c (working copy) > @@ -1898,7 +1898,6 @@ int x86_prefetch_sse; > static int ix86_regparm; > > /* -mstackrealign option */ > -extern int ix86_force_align_arg_pointer; > static const char ix86_force_align_arg_pointer_string[] > = "force_align_arg_pointer"; > > @@ -3857,7 +3856,7 @@ ix86_function_specific_print (FILE *file > struct cl_target_option *ptr) > { > char *target_string > - = ix86_target_string (ptr->ix86_isa_flags, ptr->target_flags, > + = ix86_target_string (ptr->x_ix86_isa_flags, ptr->x_target_flags, > NULL, NULL, NULL, false); > > fprintf (file, "%*sarch = %d (%s)\n", > @@ -4114,8 +4113,8 @@ ix86_valid_target_attribute_tree (tree a > ix86_option_override_internal, and then save the options away. > The string options are are attribute options, and will be undone > when we copy the save structure. */ > - if (ix86_isa_flags != def->ix86_isa_flags > - || target_flags != def->target_flags > + if (ix86_isa_flags != def->x_ix86_isa_flags > + || target_flags != def->x_target_flags > || option_strings[IX86_FUNCTION_SPECIFIC_ARCH] > || option_strings[IX86_FUNCTION_SPECIFIC_TUNE] > || option_strings[IX86_FUNCTION_SPECIFIC_FPMATH]) > @@ -4232,12 +4231,12 @@ ix86_can_inline_p (tree caller, tree cal > /* Callee's isa options should a subset of the caller's, i.e. a SSE4 function > can inline a SSE2 function but a SSE2 function can't inline a SSE4 > function. */ > - if ((caller_opts->ix86_isa_flags & callee_opts->ix86_isa_flags) > - != callee_opts->ix86_isa_flags) > + if ((caller_opts->x_ix86_isa_flags & callee_opts->x_ix86_isa_flags) > + != callee_opts->x_ix86_isa_flags) > ret = false; > > /* See if we have the same non-isa options. */ > - else if (caller_opts->target_flags != callee_opts->target_flags) > + else if (caller_opts->x_target_flags != callee_opts->x_target_flags) > ret = false; > > /* See if arch, tune, etc. are the same. */ > Index: gcc/config/sh/sh.h > =================================================================== > --- gcc/config/sh/sh.h (revision 164599) > +++ gcc/config/sh/sh.h (working copy) > @@ -503,8 +503,6 @@ extern enum sh_divide_strategy_e sh_div_ > > #define SUBTARGET_OVERRIDE_OPTIONS (void) 0 > > -extern const char *sh_fixed_range_str; > - > > /* Target machine storage layout. */ > > Index: gcc/config/lm32/lm32.h > =================================================================== > --- gcc/config/lm32/lm32.h (revision 164599) > +++ gcc/config/lm32/lm32.h (working copy) > @@ -68,8 +68,6 @@ > #undef LIB_SPEC > #define LIB_SPEC "%{!T*:-T sim.ld}" > > -extern int target_flags; > - > /* Add -G xx support. */ > > #undef SWITCH_TAKES_ARG > Index: gcc/config/cris/cris.h > =================================================================== > --- gcc/config/cris/cris.h (revision 164599) > +++ gcc/config/cris/cris.h (working copy) > @@ -280,9 +280,6 @@ extern int cris_cpu_version; > } \ > while (0) > > -/* This needs to be at least 32 bits. */ > -extern int target_flags; > - > /* Previously controlled by target_flags. */ > #define TARGET_ELF 1 > > Index: gcc/config/rs6000/rs6000.h > =================================================================== > --- gcc/config/rs6000/rs6000.h (revision 164599) > +++ gcc/config/rs6000/rs6000.h (working copy) > @@ -471,7 +471,6 @@ extern int rs6000_float_gprs; > extern int rs6000_alignment_flags; > extern const char *rs6000_sched_insert_nops_str; > extern enum rs6000_nop_insertion rs6000_sched_insert_nops; > -extern int rs6000_xilinx_fpu; > > /* Describe which vector unit to use for a given machine mode. */ > enum rs6000_vector { > @@ -2417,9 +2416,7 @@ extern char rs6000_reg_names[][8]; /* re > /* #define MACHINE_no_sched_speculative_load */ > > /* General flags. */ > -extern int flag_pic; > extern int optimize; > -extern int flag_expensive_optimizations; > extern int frame_pointer_needed; > > /* Classification of the builtin functions to properly set the declaration tree > Index: gcc/config/mcore/mcore.md > =================================================================== > --- gcc/config/mcore/mcore.md (revision 164599) > +++ gcc/config/mcore/mcore.md (working copy) > @@ -1,5 +1,5 @@ > ;; Machine description the Motorola MCore > -;; Copyright (C) 1993, 1999, 2000, 2004, 2005, 2007 > +;; Copyright (C) 1993, 1999, 2000, 2004, 2005, 2007, 2009, 2010 > ;; Free Software Foundation, Inc. > ;; Contributed by Motorola. > > @@ -697,8 +697,6 @@ > "" > " > { > - extern int flag_omit_frame_pointer; > - > /* If this is an add to the frame pointer, then accept it as is so > that we can later fold in the fp/sp offset from frame pointer > elimination. */ > Index: gcc/config/mcore/mcore.h > =================================================================== > --- gcc/config/mcore/mcore.h (revision 164599) > +++ gcc/config/mcore/mcore.h (working copy) > @@ -134,7 +134,6 @@ extern char * mcore_current_function_nam > #define STACK_BOUNDARY (TARGET_8ALIGN ? 64 : 32) > > /* Largest increment in UNITS we allow the stack to grow in a single operation. */ > -extern int mcore_stack_increment; > #define STACK_UNITS_MAXSTEP 4096 > > /* Allocation boundary (in *bits*) for the code of a function. */ > Index: gcc/config/score/score-conv.h > =================================================================== > --- gcc/config/score/score-conv.h (revision 164599) > +++ gcc/config/score/score-conv.h (working copy) > @@ -1,5 +1,5 @@ > /* score-conv.h for Sunplus S+CORE processor > - Copyright (C) 2005, 2007 Free Software Foundation, Inc. > + Copyright (C) 2005, 2007, 2009, 2010 Free Software Foundation, Inc. > > This file is part of GCC. > > @@ -20,8 +20,6 @@ > #ifndef GCC_SCORE_CONV_H > #define GCC_SCORE_CONV_H > > -extern int target_flags; > - > #define GP_REG_FIRST 0U > #define GP_REG_LAST 31U > #define GP_REG_NUM (GP_REG_LAST - GP_REG_FIRST + 1U) > Index: gcc/config/arm/arm.h > =================================================================== > --- gcc/config/arm/arm.h (revision 164599) > +++ gcc/config/arm/arm.h (working copy) > @@ -992,6 +992,9 @@ extern int arm_structure_size_boundary; > ? ARM_HARD_FRAME_POINTER_REGNUM \ > : THUMB_HARD_FRAME_POINTER_REGNUM) > > +#define HARD_FRAME_POINTER_IS_FRAME_POINTER 0 > +#define HARD_FRAME_POINTER_IS_ARG_POINTER 0 > + > #define FP_REGNUM HARD_FRAME_POINTER_REGNUM > > /* Register to use for pushing function arguments. */ > Index: gcc/config/mips/mips.h > =================================================================== > --- gcc/config/mips/mips.h (revision 164599) > +++ gcc/config/mips/mips.h (working copy) > @@ -1736,6 +1736,9 @@ enum mips_code_readable_setting { > #define HARD_FRAME_POINTER_REGNUM \ > (TARGET_MIPS16 ? GP_REG_FIRST + 17 : GP_REG_FIRST + 30) > > +#define HARD_FRAME_POINTER_IS_FRAME_POINTER 0 > +#define HARD_FRAME_POINTER_IS_ARG_POINTER 0 > + > /* Register in which static-chain is passed to a function. */ > #define STATIC_CHAIN_REGNUM (GP_REG_FIRST + 15) > > Index: gcc/config/mmix/mmix.h > =================================================================== > --- gcc/config/mmix/mmix.h (revision 164599) > +++ gcc/config/mmix/mmix.h (working copy) > @@ -140,8 +140,6 @@ struct GTY(()) machine_function > } \ > while (0) > > -extern int target_flags; > - > #define TARGET_DEFAULT \ > (MASK_BRANCH_PREDICT | MASK_BASE_ADDRESSES | MASK_USE_RETURN_INSN) > > Index: gcc/config/bfin/bfin.h > =================================================================== > --- gcc/config/bfin/bfin.h (revision 164599) > +++ gcc/config/bfin/bfin.h (working copy) > @@ -72,10 +72,6 @@ extern unsigned int bfin_workarounds; > /* Print subsidiary information on the compiler version in use. */ > #define TARGET_VERSION fprintf (stderr, " (BlackFin bfin)") > > -/* Run-time compilation parameters selecting different hardware subsets. */ > - > -extern int target_flags; > - > /* Predefinition in the preprocessor for this target machine */ > #ifndef TARGET_CPU_CPP_BUILTINS > #define TARGET_CPU_CPP_BUILTINS() \ > Index: gcc/stmt.c > =================================================================== > --- gcc/stmt.c (revision 164599) > +++ gcc/stmt.c (working copy) > @@ -1834,7 +1834,7 @@ expand_nl_goto_receiver (void) > decrementing fp by STARTING_FRAME_OFFSET. */ > emit_move_insn (virtual_stack_vars_rtx, hard_frame_pointer_rtx); > > -#if ARG_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM > +#if !HARD_FRAME_POINTER_IS_ARG_POINTER > if (fixed_regs[ARG_POINTER_REGNUM]) > { > #ifdef ELIMINABLE_REGS > Index: gcc/reload1.c > =================================================================== > --- gcc/reload1.c (revision 164599) > +++ gcc/reload1.c (working copy) > @@ -831,7 +831,7 @@ reload (rtx first, int global) > spill_hard_reg (from, 1); > } > > -#if HARD_FRAME_POINTER_REGNUM != FRAME_POINTER_REGNUM > +#if !HARD_FRAME_POINTER_IS_FRAME_POINTER > if (frame_pointer_needed) > spill_hard_reg (HARD_FRAME_POINTER_REGNUM, 1); > #endif > @@ -3232,7 +3232,7 @@ eliminate_regs_in_insn (rtx insn, int re > for (ep = reg_eliminate; ep < ®_eliminate[NUM_ELIMINABLE_REGS]; ep++) > if (ep->from_rtx == SET_DEST (old_set) && ep->can_eliminate) > { > -#if HARD_FRAME_POINTER_REGNUM != FRAME_POINTER_REGNUM > +#if !HARD_FRAME_POINTER_IS_FRAME_POINTER > /* If this is setting the frame pointer register to the > hardware frame pointer register and this is an elimination > that will be done (tested above), this insn is really > Index: libcpp/directives.c > =================================================================== > --- libcpp/directives.c (revision 164599) > +++ libcpp/directives.c (working copy) > @@ -354,7 +354,7 @@ directive_diagnostics (cpp_reader *pfile > cpp_error (pfile, CPP_DL_PEDWARN, "#%s is a GCC extension", dir->name); > else if (((dir->flags & DEPRECATED) != 0 > || (dir == &dtable[T_IMPORT] && !CPP_OPTION (pfile, objc))) > - && CPP_OPTION (pfile, warn_deprecated)) > + && CPP_OPTION (pfile, cpp_warn_deprecated)) > cpp_warning (pfile, CPP_W_DEPRECATED, > "#%s is a deprecated GCC extension", dir->name); > } > @@ -400,7 +400,7 @@ _cpp_handle_directive (cpp_reader *pfile > > if (was_parsing_args) > { > - if (CPP_OPTION (pfile, pedantic)) > + if (CPP_OPTION (pfile, cpp_pedantic)) > cpp_error (pfile, CPP_DL_PEDWARN, > "embedding a directive within macro arguments is not portable"); > pfile->state.parsing_args = 0; > Index: libcpp/macro.c > =================================================================== > --- libcpp/macro.c (revision 164599) > +++ libcpp/macro.c (working copy) > @@ -1,7 +1,7 @@ > /* Part of CPP library. (Macro and #define handling.) > Copyright (C) 1986, 1987, 1989, 1992, 1993, 1994, 1995, 1996, 1998, > 1999, 2000, 2001, 2002, 2003, 2004, 2005, > - 2006, 2007, 2008, 2009 Free Software Foundation, Inc. > + 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. > Written by Per Bothner, 1994. > Based on CCCP program by Paul Rubin, June 1986 > Adapted to ANSI C, Richard Stallman, Jan 1987 > @@ -1589,13 +1589,13 @@ parse_params (cpp_reader *pfile, cpp_mac > pfile->spec_nodes.n__VA_ARGS__); > pfile->state.va_args_ok = 1; > if (! CPP_OPTION (pfile, c99) > - && CPP_OPTION (pfile, pedantic) > + && CPP_OPTION (pfile, cpp_pedantic) > && CPP_OPTION (pfile, warn_variadic_macros)) > cpp_pedwarning > (pfile, CPP_W_VARIADIC_MACROS, > "anonymous variadic macros were introduced in C99"); > } > - else if (CPP_OPTION (pfile, pedantic) > + else if (CPP_OPTION (pfile, cpp_pedantic) > && CPP_OPTION (pfile, warn_variadic_macros)) > cpp_pedwarning (pfile, CPP_W_VARIADIC_MACROS, > "ISO C does not permit named variadic macros"); > Index: libcpp/include/cpplib.h > =================================================================== > --- libcpp/include/cpplib.h (revision 164599) > +++ libcpp/include/cpplib.h (working copy) > @@ -319,7 +319,7 @@ struct cpp_options > unsigned char print_include_names; > > /* Nonzero means complain about deprecated features. */ > - unsigned char warn_deprecated; > + unsigned char cpp_warn_deprecated; > > /* Nonzero means warn if slash-star appears in a comment. */ > unsigned char warn_comments; > @@ -336,10 +336,10 @@ struct cpp_options > > /* Nonzero means warn about various incompatibilities with > traditional C. */ > - unsigned char warn_traditional; > + unsigned char cpp_warn_traditional; > > /* Nonzero means warn about long long numeric constants. */ > - unsigned char warn_long_long; > + unsigned char cpp_warn_long_long; > > /* Nonzero means warn about text after an #endif (or #else). */ > unsigned char warn_endif_labels; > @@ -383,7 +383,7 @@ struct cpp_options > unsigned char std; > > /* Nonzero means give all the error messages the ANSI standard requires. */ > - unsigned char pedantic; > + unsigned char cpp_pedantic; > > /* Nonzero means we're looking at already preprocessed code, so don't > bother trying to do macro expansion and whatnot. */ > Index: libcpp/init.c > =================================================================== > --- libcpp/init.c (revision 164599) > +++ libcpp/init.c (working copy) > @@ -160,8 +160,8 @@ cpp_create_reader (enum c_lang lang, has > CPP_OPTION (pfile, operator_names) = 1; > CPP_OPTION (pfile, warn_trigraphs) = 2; > CPP_OPTION (pfile, warn_endif_labels) = 1; > - CPP_OPTION (pfile, warn_deprecated) = 1; > - CPP_OPTION (pfile, warn_long_long) = 0; > + CPP_OPTION (pfile, cpp_warn_deprecated) = 1; > + CPP_OPTION (pfile, cpp_warn_long_long) = 0; > CPP_OPTION (pfile, dollars_in_ident) = 1; > CPP_OPTION (pfile, warn_dollars) = 1; > CPP_OPTION (pfile, warn_variadic_macros) = 1; > @@ -698,7 +698,7 @@ post_options (cpp_reader *pfile) > { > /* -Wtraditional is not useful in C++ mode. */ > if (CPP_OPTION (pfile, cplusplus)) > - CPP_OPTION (pfile, warn_traditional) = 0; > + CPP_OPTION (pfile, cpp_warn_traditional) = 0; > > /* Permanently disable macro expansion if we are rescanning > preprocessed text. Read preprocesed source in ISO mode. */ > Index: libcpp/expr.c > =================================================================== > --- libcpp/expr.c (revision 164599) > +++ libcpp/expr.c (working copy) > @@ -418,7 +418,7 @@ cpp_classify_number (cpp_reader *pfile, > { > int u_or_i = (result & (CPP_N_UNSIGNED|CPP_N_IMAGINARY)); > int large = (result & CPP_N_WIDTH) == CPP_N_LARGE > - && CPP_OPTION (pfile, warn_long_long); > + && CPP_OPTION (pfile, cpp_warn_long_long); > > if (u_or_i || large) > cpp_warning (pfile, large ? CPP_W_LONG_LONG : CPP_W_TRADITIONAL, > @@ -427,7 +427,7 @@ cpp_classify_number (cpp_reader *pfile, > } > > if ((result & CPP_N_WIDTH) == CPP_N_LARGE > - && CPP_OPTION (pfile, warn_long_long)) > + && CPP_OPTION (pfile, cpp_warn_long_long)) > { > const char *message = CPP_OPTION (pfile, cplusplus) > ? N_("use of C++0x long long integer constant") > @@ -814,7 +814,7 @@ eval_token (cpp_reader *pfile, const cpp > if (CPP_PEDANTIC (pfile)) > cpp_error (pfile, CPP_DL_PEDWARN, > "assertions are a GCC extension"); > - else if (CPP_OPTION (pfile, warn_deprecated)) > + else if (CPP_OPTION (pfile, cpp_warn_deprecated)) > cpp_warning (pfile, CPP_W_DEPRECATED, > "assertions are a deprecated extension"); > } > Index: libcpp/internal.h > =================================================================== > --- libcpp/internal.h (revision 164599) > +++ libcpp/internal.h (working copy) > @@ -1,6 +1,6 @@ > /* Part of CPP library. > Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, > - 2008, 2009 Free Software Foundation, Inc. > + 2008, 2009, 2010 Free Software Foundation, Inc. > > This program is free software; you can redistribute it and/or modify it > under the terms of the GNU General Public License as published by the > @@ -526,8 +526,8 @@ cpp_in_system_header (cpp_reader *pfile) > { > return pfile->buffer ? pfile->buffer->sysp : 0; > } > -#define CPP_PEDANTIC(PF) CPP_OPTION (PF, pedantic) > -#define CPP_WTRADITIONAL(PF) CPP_OPTION (PF, warn_traditional) > +#define CPP_PEDANTIC(PF) CPP_OPTION (PF, cpp_pedantic) > +#define CPP_WTRADITIONAL(PF) CPP_OPTION (PF, cpp_warn_traditional) > > static inline int cpp_in_primary_file (cpp_reader *); > static inline int > > -- > Joseph S. Myers > joseph@codesourcery.com >
On Wed, 29 Sep 2010, Richard Guenther wrote: > We are moving away from target macros, so please make this a hook > instead or think of an alternative solution. The macros are used to determine the values of enum global_rtl_index in rtl.h. This is not something you can do with a hook; you'd need to redesign how global_rtl works and is used.
On Wed, Sep 29, 2010 at 4:34 PM, Joseph S. Myers <joseph@codesourcery.com> wrote: > On Wed, 29 Sep 2010, Richard Guenther wrote: > >> We are moving away from target macros, so please make this a hook >> instead or think of an alternative solution. > > The macros are used to determine the values of enum global_rtl_index in > rtl.h. This is not something you can do with a hook; you'd need to > redesign how global_rtl works and is used. Hm, I see now. I guess the patch is ok as-is then. Thanks, Richard.
It looks like this patch (r164723) broke the build on hppa2.0w-hp-hpux11.11. I am failing with: In file included from ./tm.h:29:0, > from /proj/opensrc/nightly/src/trunk/gcc/c-lang.c:26: > /proj/opensrc/nightly/src/trunk/gcc/defaults.h:345:6: error: token "." is not valid in preprocessor expressions > /proj/opensrc/nightly/src/trunk/gcc/defaults.h:415:43: error: token "." is not valid in preprocessor expressions The lines in defaults.h contain: # if SUPPORTS_WEAK and #if defined (TARGET_ASM_NAMED_SECTION) && SUPPORTS_WEAK And looking through the defines I see: gcc/config/pa/som.h:#define SUPPORTS_WEAK (TARGET_SOM_SDEF && TARGET_GAS) obj_gcc/gcc/options.h:#define target_flags global_options.x_target_flags obj_gcc/gcc/options.h:#define MASK_GAS (1 << 4) obj_gcc/gcc/options.h:#define TARGET_GAS ((target_flags & MASK_GAS) != 0) I am not sure how to address this. Steve Ellcey sje@cup.hp.com
On Thu, Sep 30, 2010 at 3:47 PM, Steve Ellcey <sje@cup.hp.com> wrote: > It looks like this patch (r164723) broke the build on hppa2.0w-hp-hpux11.11. > I am failing with: > > > In file included from ./tm.h:29:0, >> from /proj/opensrc/nightly/src/trunk/gcc/c-lang.c:26: >> /proj/opensrc/nightly/src/trunk/gcc/defaults.h:345:6: error: token "." is not valid in preprocessor expressions >> /proj/opensrc/nightly/src/trunk/gcc/defaults.h:415:43: error: token "." is not valid in preprocessor expressions > > The lines in defaults.h contain: Really defaults.h should not be included in target libraries. Thanks, Andrew Pinski
On Thu, 30 Sep 2010, Steve Ellcey wrote: > It looks like this patch (r164723) broke the build on hppa2.0w-hp-hpux11.11. > I am failing with: > > > In file included from ./tm.h:29:0, > > from /proj/opensrc/nightly/src/trunk/gcc/c-lang.c:26: > > /proj/opensrc/nightly/src/trunk/gcc/defaults.h:345:6: error: token "." is not valid in preprocessor expressions > > /proj/opensrc/nightly/src/trunk/gcc/defaults.h:415:43: error: token "." is not valid in preprocessor expressions > > The lines in defaults.h contain: > > # if SUPPORTS_WEAK > and > #if defined (TARGET_ASM_NAMED_SECTION) && SUPPORTS_WEAK > > And looking through the defines I see: > > gcc/config/pa/som.h:#define SUPPORTS_WEAK (TARGET_SOM_SDEF && TARGET_GAS) > obj_gcc/gcc/options.h:#define target_flags global_options.x_target_flags > obj_gcc/gcc/options.h:#define MASK_GAS (1 << 4) > obj_gcc/gcc/options.h:#define TARGET_GAS ((target_flags & MASK_GAS) != 0) > > I am not sure how to address this. As with HARD_FRAME_POINTER_IS_FRAME_POINTER and HARD_FRAME_POINTER_IS_ARG_POINTER, and with the powerpc64-linux fix (r164764), if a target macro is used in preprocessor conditionals then it must not depend on command-line options, and if it does at present you need to define a new macro that does not. Such dependencies have never made much logical sense, but now they break the build rather than quietly treating target_flags as 0.
On Thu, 30 Sep 2010, Joseph S. Myers wrote: > > The lines in defaults.h contain: > > > > # if SUPPORTS_WEAK > > and > > #if defined (TARGET_ASM_NAMED_SECTION) && SUPPORTS_WEAK > > > > And looking through the defines I see: > > > > gcc/config/pa/som.h:#define SUPPORTS_WEAK (TARGET_SOM_SDEF && TARGET_GAS) > > obj_gcc/gcc/options.h:#define target_flags global_options.x_target_flags > > obj_gcc/gcc/options.h:#define MASK_GAS (1 << 4) > > obj_gcc/gcc/options.h:#define TARGET_GAS ((target_flags & MASK_GAS) != 0) > > > > I am not sure how to address this. > > As with HARD_FRAME_POINTER_IS_FRAME_POINTER and > HARD_FRAME_POINTER_IS_ARG_POINTER, and with the powerpc64-linux fix > (r164764), if a target macro is used in preprocessor conditionals then it > must not depend on command-line options, and if it does at present you > need to define a new macro that does not. Such dependencies have never > made much logical sense, but now they break the build rather than quietly > treating target_flags as 0. The current documentation for SUPPORTS_WEAK indicates that it should be defined to a valid C expression, not to a preprocessor constant. In particular, it says "Define this macro if you want to control weak symbol support with a compiler flag such as @option{-melf}." So, uses assuming that it is a preprocessor constant are wrong. In this case, the uses of the macro are all in the generic code. The second error mentioned in Steve's report may be a bug as TARGET_ASM_NAMED_SECTION isn't defined for hppa2.0w-hp-hpux11.11. I certainly agree that cleaning up these issues is important. Dave
Index: gcc/regrename.c =================================================================== --- gcc/regrename.c (revision 164599) +++ gcc/regrename.c (working copy) @@ -200,7 +200,7 @@ regrename_optimize (void) if (frame_pointer_needed) { add_to_hard_reg_set (&unavailable, Pmode, FRAME_POINTER_REGNUM); -#if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM +#if !HARD_FRAME_POINTER_IS_FRAME_POINTER add_to_hard_reg_set (&unavailable, Pmode, HARD_FRAME_POINTER_REGNUM); #endif } @@ -233,7 +233,7 @@ regrename_optimize (void) #endif if (fixed_regs[reg] || global_regs[reg] -#if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM +#if !HARD_FRAME_POINTER_IS_FRAME_POINTER || (frame_pointer_needed && reg == HARD_FRAME_POINTER_REGNUM) #else || (frame_pointer_needed && reg == FRAME_POINTER_REGNUM) Index: gcc/doc/tm.texi =================================================================== --- gcc/doc/tm.texi (revision 164599) +++ gcc/doc/tm.texi (working copy) @@ -3643,6 +3643,22 @@ pointer register, then you must mark it (@pxref{Elimination}). @end defmac +@defmac HARD_FRAME_POINTER_IS_FRAME_POINTER +Define this to a preprocessor constant that is nonzero if +@code{hard_frame_pointer_rtx} and @code{frame_pointer_rtx} should be +the same. The default definition is @samp{(HARD_FRAME_POINTER_REGNUM +== FRAME_POINTER_REGNUM)}; you only need to define this macro if that +definition is not suitable for use in preprocessor conditionals. +@end defmac + +@defmac HARD_FRAME_POINTER_IS_ARG_POINTER +Define this to a preprocessor constant that is nonzero if +@code{hard_frame_pointer_rtx} and @code{arg_pointer_rtx} should be the +same. The default definition is @samp{(HARD_FRAME_POINTER_REGNUM == +ARG_POINTER_REGNUM)}; you only need to define this macro if that +definition is not suitable for use in preprocessor conditionals. +@end defmac + @defmac RETURN_ADDRESS_POINTER_REGNUM The register number of the return address pointer register, which is used to access the current function's return address from the stack. On some Index: gcc/doc/tm.texi.in =================================================================== --- gcc/doc/tm.texi.in (revision 164599) +++ gcc/doc/tm.texi.in (working copy) @@ -3643,6 +3643,22 @@ pointer register, then you must mark it (@pxref{Elimination}). @end defmac +@defmac HARD_FRAME_POINTER_IS_FRAME_POINTER +Define this to a preprocessor constant that is nonzero if +@code{hard_frame_pointer_rtx} and @code{frame_pointer_rtx} should be +the same. The default definition is @samp{(HARD_FRAME_POINTER_REGNUM +== FRAME_POINTER_REGNUM)}; you only need to define this macro if that +definition is not suitable for use in preprocessor conditionals. +@end defmac + +@defmac HARD_FRAME_POINTER_IS_ARG_POINTER +Define this to a preprocessor constant that is nonzero if +@code{hard_frame_pointer_rtx} and @code{arg_pointer_rtx} should be the +same. The default definition is @samp{(HARD_FRAME_POINTER_REGNUM == +ARG_POINTER_REGNUM)}; you only need to define this macro if that +definition is not suitable for use in preprocessor conditionals. +@end defmac + @defmac RETURN_ADDRESS_POINTER_REGNUM The register number of the return address pointer register, which is used to access the current function's return address from the stack. On some Index: gcc/flags.h =================================================================== --- gcc/flags.h (revision 164599) +++ gcc/flags.h (working copy) @@ -77,6 +77,11 @@ extern void set_struct_debug_option (con debugging information. */ extern bool use_gnu_debug_info_extensions; +/* Run the second compilation of -fcompare-debug. Not defined using + Var in common.opt because this is used in Ada code and so must be + an actual variable not a macro. */ +extern int flag_compare_debug; + /* Enumerate visibility settings. This is deliberately ordered from most to least visibility. */ #ifndef SYMBOL_VISIBILITY_DEFINED Index: gcc/c-family/c-opts.c =================================================================== --- gcc/c-family/c-opts.c (revision 164599) +++ gcc/c-family/c-opts.c (working copy) @@ -157,7 +157,7 @@ warning_as_error_callback (int option_in break; case OPT_Wdeprecated: - cpp_opts->warn_deprecated = 1; + cpp_opts->cpp_warn_deprecated = 1; break; case OPT_Wcomment: @@ -173,11 +173,11 @@ warning_as_error_callback (int option_in break; case OPT_Wtraditional: - cpp_opts->warn_traditional = 1; + cpp_opts->cpp_warn_traditional = 1; break; case OPT_Wlong_long: - cpp_opts->warn_long_long = 1; + cpp_opts->cpp_warn_long_long = 1; break; case OPT_Wendif_labels: @@ -508,7 +508,7 @@ c_common_handle_option (size_t scode, co break; case OPT_Wdeprecated: - cpp_opts->warn_deprecated = value; + cpp_opts->cpp_warn_deprecated = value; break; case OPT_Wendif_labels: @@ -567,7 +567,7 @@ c_common_handle_option (size_t scode, co break; case OPT_Wtraditional: - cpp_opts->warn_traditional = value; + cpp_opts->cpp_warn_traditional = value; break; case OPT_Wtrigraphs: @@ -788,7 +788,7 @@ c_common_handle_option (size_t scode, co is not overridden. */ case OPT_pedantic_errors: case OPT_pedantic: - cpp_opts->pedantic = 1; + cpp_opts->cpp_pedantic = 1; cpp_opts->warn_endif_labels = 1; if (warn_pointer_sign == -1) warn_pointer_sign = 1; @@ -1314,7 +1314,7 @@ sanitize_cpp_opts (void) if (warn_long_long == -1) warn_long_long = ((pedantic || warn_traditional) && (c_dialect_cxx () ? cxx_dialect == cxx98 : !flag_isoc99)); - cpp_opts->warn_long_long = warn_long_long; + cpp_opts->cpp_warn_long_long = warn_long_long; /* Similarly with -Wno-variadic-macros. No check for c99 here, since this also turns off warnings about GCCs extension. */ @@ -1381,7 +1381,7 @@ finish_options (void) conflict with the specified standard, and since a strictly conforming program cannot contain a '$', we do not condition their acceptance on the -std= setting. */ - cpp_opts->warn_dollars = (cpp_opts->pedantic && !cpp_opts->c99); + cpp_opts->warn_dollars = (cpp_opts->cpp_pedantic && !cpp_opts->c99); cb_file_change (parse_in, linemap_add (line_table, LC_RENAME, 0, Index: gcc/c-family/c-common.c =================================================================== --- gcc/c-family/c-common.c (revision 164599) +++ gcc/c-family/c-common.c (working copy) @@ -8252,7 +8252,7 @@ c_cpp_error (cpp_reader *pfile ATTRIBUTE { diagnostic_info diagnostic; diagnostic_t dlevel; - bool save_warn_system_headers = global_dc->warn_system_headers; + bool save_warn_system_headers = global_dc->dc_warn_system_headers; bool ret; switch (level) @@ -8260,7 +8260,7 @@ c_cpp_error (cpp_reader *pfile ATTRIBUTE case CPP_DL_WARNING_SYSHDR: if (flag_no_output) return false; - global_dc->warn_system_headers = 1; + global_dc->dc_warn_system_headers = 1; /* Fall through. */ case CPP_DL_WARNING: if (flag_no_output) @@ -8297,7 +8297,7 @@ c_cpp_error (cpp_reader *pfile ATTRIBUTE c_option_controlling_cpp_error (reason)); ret = report_diagnostic (&diagnostic); if (level == CPP_DL_WARNING_SYSHDR) - global_dc->warn_system_headers = save_warn_system_headers; + global_dc->dc_warn_system_headers = save_warn_system_headers; return ret; } Index: gcc/c-family/c-cppbuiltin.c =================================================================== --- gcc/c-family/c-cppbuiltin.c (revision 164599) +++ gcc/c-family/c-cppbuiltin.c (working copy) @@ -514,14 +514,14 @@ c_cpp_builtins_optimize_pragma (cpp_read /* Other target-independent built-ins determined by command-line options. */ - if (!prev->optimize_size && cur->optimize_size) + if (!prev->x_optimize_size && cur->x_optimize_size) cpp_define (pfile, "__OPTIMIZE_SIZE__"); - else if (prev->optimize_size && !cur->optimize_size) + else if (prev->x_optimize_size && !cur->x_optimize_size) cpp_undef (pfile, "__OPTIMIZE_SIZE__"); - if (!prev->optimize && cur->optimize) + if (!prev->x_optimize && cur->x_optimize) cpp_define (pfile, "__OPTIMIZE__"); - else if (prev->optimize && !cur->optimize) + else if (prev->x_optimize && !cur->x_optimize) cpp_undef (pfile, "__OPTIMIZE__"); prev_fast_math = fast_math_flags_struct_set_p (prev); @@ -531,17 +531,17 @@ c_cpp_builtins_optimize_pragma (cpp_read else if (prev_fast_math && !cur_fast_math) cpp_undef (pfile, "__FAST_MATH__"); - if (!prev->flag_signaling_nans && cur->flag_signaling_nans) + if (!prev->x_flag_signaling_nans && cur->x_flag_signaling_nans) cpp_define (pfile, "__SUPPORT_SNAN__"); - else if (prev->flag_signaling_nans && !cur->flag_signaling_nans) + else if (prev->x_flag_signaling_nans && !cur->x_flag_signaling_nans) cpp_undef (pfile, "__SUPPORT_SNAN__"); - if (!prev->flag_finite_math_only && cur->flag_finite_math_only) + if (!prev->x_flag_finite_math_only && cur->x_flag_finite_math_only) { cpp_undef (pfile, "__FINITE_MATH_ONLY__"); cpp_define (pfile, "__FINITE_MATH_ONLY__=1"); } - else if (!prev->flag_finite_math_only && cur->flag_finite_math_only) + else if (!prev->x_flag_finite_math_only && cur->x_flag_finite_math_only) { cpp_undef (pfile, "__FINITE_MATH_ONLY__"); cpp_define (pfile, "__FINITE_MATH_ONLY__=0"); Index: gcc/java/jcf-dump.c =================================================================== --- gcc/java/jcf-dump.c (revision 164599) +++ gcc/java/jcf-dump.c (working copy) @@ -76,10 +76,6 @@ int flag_print_fields = 1; int flag_print_methods = 1; int flag_print_attributes = 1; -/* When nonzero, warn when source file is newer than matching class - file. */ -int flag_newer = 1; - /* Print names of classes that have a "main" method. */ int flag_print_main = 0; Index: gcc/java/jcf.h =================================================================== --- gcc/java/jcf.h (revision 164599) +++ gcc/java/jcf.h (working copy) @@ -1,6 +1,6 @@ /* Utility macros to read Java(TM) .class files and byte codes. Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, - 2006, 2007, 2008 Free Software Foundation, Inc. + 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of GCC. @@ -274,7 +274,6 @@ extern const char *jcf_write_base_direct /* Debug macros, for the front end */ -extern int quiet_flag; #ifdef VERBOSE_SKELETON #undef SOURCE_FRONTEND_DEBUG #define SOURCE_FRONTEND_DEBUG(X) \ Index: gcc/java/parse.h =================================================================== --- gcc/java/parse.h (revision 164599) +++ gcc/java/parse.h (working copy) @@ -1,6 +1,6 @@ /* Language parser definitions for the GNU compiler for the Java(TM) language. Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, - 2005, 2006, 2007 Free Software Foundation, Inc. + 2005, 2006, 2007, 2010 Free Software Foundation, Inc. Contributed by Alexandre Petit-Bianco (apbianco@cygnus.com) This file is part of GCC. @@ -28,7 +28,6 @@ The Free Software Foundation is independ /* Extern global variable declarations */ extern struct obstack temporary_obstack; -extern int quiet_flag; #ifdef VERBOSE_SKELETON #undef SOURCE_FRONTEND_DEBUG Index: gcc/java/java-tree.h =================================================================== --- gcc/java/java-tree.h (revision 164599) +++ gcc/java/java-tree.h (working copy) @@ -112,64 +112,11 @@ struct JCF; /* The virtual offset symbol table. Used by the runtime to fill out the otable. */ -extern int flag_filelist_file; - -/* When nonzero, permit the use of the assert keyword. */ - -extern int flag_assert; - -/* When nonzero, assume all native functions are implemented with - JNI, not CNI. */ - -extern int flag_jni; - -/* When nonzero, always check for a non gcj generated classes archive. */ - -extern int flag_force_classes_archive_check; - /* Resource name. */ extern const char *resource_name; /* Turned to 1 if -Wall was encountered. See lang.c for their meanings. */ extern int flag_wall; -extern int flag_redundant; - -/* When nonzero, warn when source file is newer than matching class - file. */ -extern int flag_newer; - -/* When nonzero, call a library routine to do integer divisions. */ -extern int flag_use_divide_subroutine; - -/* When nonzero, use atomic builtins. */ -extern int flag_use_atomic_builtins; - -/* When nonzero, generate code for the Boehm GC. */ -extern int flag_use_boehm_gc; - -/* When nonzero, assume the runtime uses a hash table to map an - object to its synchronization structure. */ -extern int flag_hash_synchronization; - -/* When nonzero, generate checks for references to NULL. */ -extern int flag_check_references; - -/* Used through STATIC_CLASS_INIT_OPT_P to check whether static - initialization optimization should be performed. */ -extern int flag_optimize_sci; - -/* Generate instances of Class at runtime. */ -extern int flag_indirect_classes; - -/* When nonzero, use offset tables for virtual method calls - in order to improve binary compatibility. */ -extern int flag_indirect_dispatch; - -/* When zero, don't generate runtime array store checks. */ -extern int flag_store_check; - -/* When nonzero, generate only a limited set of class meta-data. */ -extern int flag_reduced_reflection; /* The Java .class file that provides main_class; the main input file. */ extern GTY(()) struct JCF * current_jcf; Index: gcc/reload.c =================================================================== --- gcc/reload.c (revision 164599) +++ gcc/reload.c (working copy) @@ -1,6 +1,6 @@ /* Search an insn for pseudo regs that must be in hard regs and are not. Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 + 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of GCC. @@ -5157,7 +5157,7 @@ find_reloads_address (enum machine_mode if ((regno_ok_for_base_p (REGNO (operand), mode, inner_code, GET_CODE (addend)) || operand == frame_pointer_rtx -#if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM +#if !HARD_FRAME_POINTER_IS_FRAME_POINTER || operand == hard_frame_pointer_rtx #endif #if FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM Index: gcc/diagnostic.c =================================================================== --- gcc/diagnostic.c (revision 164599) +++ gcc/diagnostic.c (working copy) @@ -107,8 +107,8 @@ diagnostic_initialize (diagnostic_contex context->permissive = false; context->opt_permissive = 0; context->fatal_errors = false; - context->inhibit_warnings = false; - context->warn_system_headers = false; + context->dc_inhibit_warnings = false; + context->dc_warn_system_headers = false; context->internal_error = NULL; diagnostic_starter (context) = default_diagnostic_starter; diagnostic_finalizer (context) = default_diagnostic_finalizer; Index: gcc/diagnostic.h =================================================================== --- gcc/diagnostic.h (revision 164599) +++ gcc/diagnostic.h (working copy) @@ -124,10 +124,10 @@ struct diagnostic_context bool fatal_errors; /* True if all warnings should be disabled. */ - bool inhibit_warnings; + bool dc_inhibit_warnings; /* True if warnings should be given in system headers. */ - bool warn_system_headers; + bool dc_warn_system_headers; /* This function is called before any message is printed out. It is responsible for preparing message prefix and such. For example, it @@ -230,8 +230,8 @@ extern diagnostic_context *global_dc; /* Returns nonzero if warnings should be emitted. */ #define diagnostic_report_warnings_p(DC, LOC) \ - (!(DC)->inhibit_warnings \ - && !(in_system_header_at (LOC) && !(DC)->warn_system_headers)) + (!(DC)->dc_inhibit_warnings \ + && !(in_system_header_at (LOC) && !(DC)->dc_warn_system_headers)) #define report_diagnostic(D) diagnostic_report_diagnostic (global_dc, D) Index: gcc/builtins.c =================================================================== --- gcc/builtins.c (revision 164599) +++ gcc/builtins.c (working copy) @@ -835,7 +835,7 @@ expand_builtin_setjmp_receiver (rtx rece emit_clobber (hard_frame_pointer_rtx); } -#if ARG_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM +#if !HARD_FRAME_POINTER_IS_ARG_POINTER if (fixed_regs[ARG_POINTER_REGNUM]) { #ifdef ELIMINABLE_REGS Index: gcc/df-scan.c =================================================================== --- gcc/df-scan.c (revision 164599) +++ gcc/df-scan.c (working copy) @@ -3406,7 +3406,7 @@ df_insn_refs_collect (struct df_collecti regno_reg_rtx[FRAME_POINTER_REGNUM], NULL, bb, insn_info, DF_REF_REG_USE, 0); -#if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM +#if !HARD_FRAME_POINTER_IS_FRAME_POINTER df_ref_record (DF_REF_BASE, collection_rec, regno_reg_rtx[HARD_FRAME_POINTER_REGNUM], NULL, bb, insn_info, @@ -3604,7 +3604,7 @@ df_get_regular_block_artificial_uses (bi reference of the frame pointer. */ bitmap_set_bit (regular_block_artificial_uses, FRAME_POINTER_REGNUM); -#if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM +#if !HARD_FRAME_POINTER_IS_FRAME_POINTER bitmap_set_bit (regular_block_artificial_uses, HARD_FRAME_POINTER_REGNUM); #endif @@ -3656,7 +3656,7 @@ df_get_eh_block_artificial_uses (bitmap if (frame_pointer_needed) { bitmap_set_bit (eh_block_artificial_uses, FRAME_POINTER_REGNUM); -#if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM +#if !HARD_FRAME_POINTER_IS_FRAME_POINTER bitmap_set_bit (eh_block_artificial_uses, HARD_FRAME_POINTER_REGNUM); #endif } @@ -3744,7 +3744,7 @@ df_get_entry_block_def_set (bitmap entry /* Any reference to any pseudo before reload is a potential reference of the frame pointer. */ bitmap_set_bit (entry_block_defs, FRAME_POINTER_REGNUM); -#if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM +#if !HARD_FRAME_POINTER_IS_FRAME_POINTER /* If they are different, also mark the hard frame pointer as live. */ if (!LOCAL_REGNO (HARD_FRAME_POINTER_REGNUM)) bitmap_set_bit (entry_block_defs, HARD_FRAME_POINTER_REGNUM); @@ -3877,7 +3877,7 @@ df_get_exit_block_use_set (bitmap exit_b if ((!reload_completed) || frame_pointer_needed) { bitmap_set_bit (exit_block_uses, FRAME_POINTER_REGNUM); -#if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM +#if !HARD_FRAME_POINTER_IS_FRAME_POINTER /* If they are different, also mark the hard frame pointer as live. */ if (!LOCAL_REGNO (HARD_FRAME_POINTER_REGNUM)) bitmap_set_bit (exit_block_uses, HARD_FRAME_POINTER_REGNUM); Index: gcc/dbxout.c =================================================================== --- gcc/dbxout.c (revision 164599) +++ gcc/dbxout.c (working copy) @@ -3015,7 +3015,7 @@ dbxout_symbol_location (tree decl, tree || (REG_P (XEXP (home, 0)) && REGNO (XEXP (home, 0)) != HARD_FRAME_POINTER_REGNUM && REGNO (XEXP (home, 0)) != STACK_POINTER_REGNUM -#if ARG_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM +#if !HARD_FRAME_POINTER_IS_ARG_POINTER && REGNO (XEXP (home, 0)) != ARG_POINTER_REGNUM #endif ))) @@ -3429,7 +3429,7 @@ dbxout_parms (tree parms) && REG_P (XEXP (DECL_RTL (parms), 0)) && REGNO (XEXP (DECL_RTL (parms), 0)) != HARD_FRAME_POINTER_REGNUM && REGNO (XEXP (DECL_RTL (parms), 0)) != STACK_POINTER_REGNUM -#if ARG_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM +#if !HARD_FRAME_POINTER_IS_ARG_POINTER && REGNO (XEXP (DECL_RTL (parms), 0)) != ARG_POINTER_REGNUM #endif ) Index: gcc/sel-sched.c =================================================================== --- gcc/sel-sched.c (revision 164599) +++ gcc/sel-sched.c (working copy) @@ -1236,7 +1236,7 @@ mark_unavailable_hard_regs (def_t def, s frame pointer, or we could not discover its class. */ if (fixed_regs[regno] || global_regs[regno] -#if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM +#if !HARD_FRAME_POINTER_IS_FRAME_POINTER || (frame_pointer_needed && regno == HARD_FRAME_POINTER_REGNUM) #else || (frame_pointer_needed && regno == FRAME_POINTER_REGNUM) @@ -1263,7 +1263,7 @@ mark_unavailable_hard_regs (def_t def, s SET_HARD_REG_BIT (reg_rename_p->unavailable_hard_regs, FRAME_POINTER_REGNUM + i); -#if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM +#if !HARD_FRAME_POINTER_IS_FRAME_POINTER for (i = hard_regno_nregs[HARD_FRAME_POINTER_REGNUM][Pmode]; i--;) SET_HARD_REG_BIT (reg_rename_p->unavailable_hard_regs, HARD_FRAME_POINTER_REGNUM + i); Index: gcc/dwarf2out.c =================================================================== --- gcc/dwarf2out.c (revision 164599) +++ gcc/dwarf2out.c (working copy) @@ -16571,7 +16571,7 @@ rtl_for_decl_location (tree decl) && (!REG_P (XEXP (rtl, 0)) || REGNO (XEXP (rtl, 0)) == HARD_FRAME_POINTER_REGNUM || REGNO (XEXP (rtl, 0)) == STACK_POINTER_REGNUM -#if ARG_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM +#if !HARD_FRAME_POINTER_IS_ARG_POINTER || REGNO (XEXP (rtl, 0)) == ARG_POINTER_REGNUM #endif ) Index: gcc/opts.c =================================================================== --- gcc/opts.c (revision 164599) +++ gcc/opts.c (working copy) @@ -123,6 +123,11 @@ static enum debug_struct_file debug_stru static enum debug_struct_file debug_struct_generic[DINFO_USAGE_NUM_ENUMS] = { DINFO_STRUCT_FILE_ANY, DINFO_STRUCT_FILE_ANY, DINFO_STRUCT_FILE_ANY }; +/* Run the second compilation of -fcompare-debug. Not defined using + Var in common.opt because this is used in Ada code and so must be + an actual variable not a macro. */ +int flag_compare_debug; + /* Parse the -femit-struct-debug-detailed option value and set the flag variables. */ @@ -1624,7 +1629,7 @@ common_handle_option (const struct cl_de break; case OPT_Wsystem_headers: - global_dc->warn_system_headers = value; + global_dc->dc_warn_system_headers = value; break; case OPT_Wunused: @@ -1689,6 +1694,10 @@ common_handle_option (const struct cl_de fix_register (arg, 0, 0); break; + case OPT_fcompare_debug_second: + flag_compare_debug = value; + break; + case OPT_fdbg_cnt_: dbg_cnt_process_opt (arg); break; @@ -2072,7 +2081,7 @@ common_handle_option (const struct cl_de break; case OPT_w: - global_dc->inhibit_warnings = true; + global_dc->dc_inhibit_warnings = true; break; case OPT_fuse_linker_plugin: @@ -2175,11 +2184,11 @@ fast_math_flags_set_p (void) bool fast_math_flags_struct_set_p (struct cl_optimization *opt) { - return (!opt->flag_trapping_math - && opt->flag_unsafe_math_optimizations - && opt->flag_finite_math_only - && !opt->flag_signed_zeros - && !opt->flag_errno_math); + return (!opt->x_flag_trapping_math + && opt->x_flag_unsafe_math_optimizations + && opt->x_flag_finite_math_only + && !opt->x_flag_signed_zeros + && !opt->x_flag_errno_math); } /* Handle a debug output -g switch. EXTENDED is true or false to support Index: gcc/optc-gen.awk =================================================================== --- gcc/optc-gen.awk (revision 164599) +++ gcc/optc-gen.awk (working copy) @@ -85,8 +85,19 @@ print "#endif /* GCC_DRIVER */" print "" have_save = 0; +print "struct gcc_options global_options =\n{" for (i = 0; i < n_extra_vars; i++) { - print extra_vars[i] ";" + var = extra_vars[i] + init = extra_vars[i] + if (var ~ "=" ) { + sub(".*= *", "", init) + sub(" *=.*", "", var) + sub("^.*[ *]", "", var) + } else { + init = "0" + } + var_seen[var] = 1 + print " " init ", /* " var " */" } for (i = 0; i < n_opts; i++) { if (flag_set_p("Save", flags[i])) @@ -96,24 +107,31 @@ for (i = 0; i < n_opts; i++) { if (name == "") continue; - if (flag_set_p("VarExists", flags[i])) { - continue; - } - else { - init = opt_args("Init", flags[i]) - if (init != "") - init = " = " init; - else if (name in var_seen) - continue; + init = opt_args("Init", flags[i]) + if (init != "") { + if (name in var_init && var_init[name] != init) + print "#error multiple initializers for " name + var_init[name] = init } +} +for (i = 0; i < n_opts; i++) { + name = var_name(flags[i]); + if (name == "") + continue; + + if (name in var_seen) + continue; + + if (name in var_init) + init = var_init[name] + else + init = "0" - print "/* Set by -" opts[i] "." - print " " help[i] " */" - print var_type(flags[i]) name init ";" - print "" + print " " init ", /* " name " */" var_seen[name] = 1; } +print "};" print "" print "/* Local state variables. */" @@ -332,19 +350,19 @@ for (i = 0; i < n_opt_char; i++) { print ""; for (i = 0; i < n_opt_other; i++) { - print " ptr->" var_opt_other[i] " = " var_opt_other[i] ";"; + print " ptr->x_" var_opt_other[i] " = " var_opt_other[i] ";"; } for (i = 0; i < n_opt_int; i++) { - print " ptr->" var_opt_int[i] " = " var_opt_int[i] ";"; + print " ptr->x_" var_opt_int[i] " = " var_opt_int[i] ";"; } for (i = 0; i < n_opt_short; i++) { - print " ptr->" var_opt_short[i] " = " var_opt_short[i] ";"; + print " ptr->x_" var_opt_short[i] " = " var_opt_short[i] ";"; } for (i = 0; i < n_opt_char; i++) { - print " ptr->" var_opt_char[i] " = " var_opt_char[i] ";"; + print " ptr->x_" var_opt_char[i] " = " var_opt_char[i] ";"; } print "}"; @@ -356,19 +374,19 @@ print "cl_optimization_restore (struct c print "{"; for (i = 0; i < n_opt_other; i++) { - print " " var_opt_other[i] " = ptr->" var_opt_other[i] ";"; + print " " var_opt_other[i] " = ptr->x_" var_opt_other[i] ";"; } for (i = 0; i < n_opt_int; i++) { - print " " var_opt_int[i] " = ptr->" var_opt_int[i] ";"; + print " " var_opt_int[i] " = ptr->x_" var_opt_int[i] ";"; } for (i = 0; i < n_opt_short; i++) { - print " " var_opt_short[i] " = ptr->" var_opt_short[i] ";"; + print " " var_opt_short[i] " = ptr->x_" var_opt_short[i] ";"; } for (i = 0; i < n_opt_char; i++) { - print " " var_opt_char[i] " = ptr->" var_opt_char[i] ";"; + print " " var_opt_char[i] " = ptr->x_" var_opt_char[i] ";"; } print " targetm.override_options_after_change ();"; @@ -384,38 +402,38 @@ print "{"; print " fputs (\"\\n\", file);"; for (i = 0; i < n_opt_other; i++) { - print " if (ptr->" var_opt_other[i] ")"; + print " if (ptr->x_" var_opt_other[i] ")"; print " fprintf (file, \"%*s%s (%#lx)\\n\","; print " indent_to, \"\","; print " \"" var_opt_other[i] "\","; - print " (unsigned long)ptr->" var_opt_other[i] ");"; + print " (unsigned long)ptr->x_" var_opt_other[i] ");"; print ""; } for (i = 0; i < n_opt_int; i++) { - print " if (ptr->" var_opt_int[i] ")"; + print " if (ptr->x_" var_opt_int[i] ")"; print " fprintf (file, \"%*s%s (%#x)\\n\","; print " indent_to, \"\","; print " \"" var_opt_int[i] "\","; - print " ptr->" var_opt_int[i] ");"; + print " ptr->x_" var_opt_int[i] ");"; print ""; } for (i = 0; i < n_opt_short; i++) { - print " if (ptr->" var_opt_short[i] ")"; + print " if (ptr->x_" var_opt_short[i] ")"; print " fprintf (file, \"%*s%s (%#x)\\n\","; print " indent_to, \"\","; print " \"" var_opt_short[i] "\","; - print " ptr->" var_opt_short[i] ");"; + print " ptr->x_" var_opt_short[i] ");"; print ""; } for (i = 0; i < n_opt_char; i++) { - print " if (ptr->" var_opt_char[i] ")"; + print " if (ptr->x_" var_opt_char[i] ")"; print " fprintf (file, \"%*s%s (%#x)\\n\","; print " indent_to, \"\","; print " \"" var_opt_char[i] "\","; - print " ptr->" var_opt_char[i] ");"; + print " ptr->x_" var_opt_char[i] ");"; print ""; } @@ -482,19 +500,19 @@ print " targetm.target_option.save (p print ""; for (i = 0; i < n_target_other; i++) { - print " ptr->" var_target_other[i] " = " var_target_other[i] ";"; + print " ptr->x_" var_target_other[i] " = " var_target_other[i] ";"; } for (i = 0; i < n_target_int; i++) { - print " ptr->" var_target_int[i] " = " var_target_int[i] ";"; + print " ptr->x_" var_target_int[i] " = " var_target_int[i] ";"; } for (i = 0; i < n_target_short; i++) { - print " ptr->" var_target_short[i] " = " var_target_short[i] ";"; + print " ptr->x_" var_target_short[i] " = " var_target_short[i] ";"; } for (i = 0; i < n_target_char; i++) { - print " ptr->" var_target_char[i] " = " var_target_char[i] ";"; + print " ptr->x_" var_target_char[i] " = " var_target_char[i] ";"; } print "}"; @@ -506,19 +524,19 @@ print "cl_target_option_restore (struct print "{"; for (i = 0; i < n_target_other; i++) { - print " " var_target_other[i] " = ptr->" var_target_other[i] ";"; + print " " var_target_other[i] " = ptr->x_" var_target_other[i] ";"; } for (i = 0; i < n_target_int; i++) { - print " " var_target_int[i] " = ptr->" var_target_int[i] ";"; + print " " var_target_int[i] " = ptr->x_" var_target_int[i] ";"; } for (i = 0; i < n_target_short; i++) { - print " " var_target_short[i] " = ptr->" var_target_short[i] ";"; + print " " var_target_short[i] " = ptr->x_" var_target_short[i] ";"; } for (i = 0; i < n_target_char; i++) { - print " " var_target_char[i] " = ptr->" var_target_char[i] ";"; + print " " var_target_char[i] " = ptr->x_" var_target_char[i] ";"; } # This must occur after the normal variables in case the code depends on those @@ -539,38 +557,38 @@ print "{"; print " fputs (\"\\n\", file);"; for (i = 0; i < n_target_other; i++) { - print " if (ptr->" var_target_other[i] ")"; + print " if (ptr->x_" var_target_other[i] ")"; print " fprintf (file, \"%*s%s (%#lx)\\n\","; print " indent, \"\","; print " \"" var_target_other[i] "\","; - print " (unsigned long)ptr->" var_target_other[i] ");"; + print " (unsigned long)ptr->x_" var_target_other[i] ");"; print ""; } for (i = 0; i < n_target_int; i++) { - print " if (ptr->" var_target_int[i] ")"; + print " if (ptr->x_" var_target_int[i] ")"; print " fprintf (file, \"%*s%s (%#x)\\n\","; print " indent, \"\","; print " \"" var_target_int[i] "\","; - print " ptr->" var_target_int[i] ");"; + print " ptr->x_" var_target_int[i] ");"; print ""; } for (i = 0; i < n_target_short; i++) { - print " if (ptr->" var_target_short[i] ")"; + print " if (ptr->x_" var_target_short[i] ")"; print " fprintf (file, \"%*s%s (%#x)\\n\","; print " indent, \"\","; print " \"" var_target_short[i] "\","; - print " ptr->" var_target_short[i] ");"; + print " ptr->x_" var_target_short[i] ");"; print ""; } for (i = 0; i < n_target_char; i++) { - print " if (ptr->" var_target_char[i] ")"; + print " if (ptr->x_" var_target_char[i] ")"; print " fprintf (file, \"%*s%s (%#x)\\n\","; print " indent, \"\","; print " \"" var_target_char[i] "\","; - print " ptr->" var_target_char[i] ");"; + print " ptr->x_" var_target_char[i] ");"; print ""; } Index: gcc/fortran/intrinsic.c =================================================================== --- gcc/fortran/intrinsic.c (revision 164599) +++ gcc/fortran/intrinsic.c (working copy) @@ -4271,7 +4271,7 @@ gfc_convert_type_warn (gfc_expr *expr, g gfc_warning_now ("Conversion from %s to %s at %L", gfc_typename (&from_ts), gfc_typename (ts), &expr->where); - else if (gfc_option.warn_conversion + else if (gfc_option.gfc_warn_conversion && from_ts.kind > ts->kind) gfc_warning_now ("Possible change of value in conversion " "from %s to %s at %L", gfc_typename (&from_ts), @@ -4284,7 +4284,7 @@ gfc_convert_type_warn (gfc_expr *expr, g /* Conversion from REAL/COMPLEX to INTEGER or COMPLEX to REAL usually comes with a loss of information, regardless of kinds. */ if (gfc_option.warn_conversion_extra - || gfc_option.warn_conversion) + || gfc_option.gfc_warn_conversion) gfc_warning_now ("Possible change of value in conversion " "from %s to %s at %L", gfc_typename (&from_ts), gfc_typename (ts), &expr->where); @@ -4293,7 +4293,7 @@ gfc_convert_type_warn (gfc_expr *expr, g { /* If HOLLERITH is involved, all bets are off. */ if (gfc_option.warn_conversion_extra - || gfc_option.warn_conversion) + || gfc_option.gfc_warn_conversion) gfc_warning_now ("Conversion from %s to %s at %L", gfc_typename (&from_ts), gfc_typename (ts), &expr->where); Index: gcc/fortran/cpp.c =================================================================== --- gcc/fortran/cpp.c (revision 164599) +++ gcc/fortran/cpp.c (working copy) @@ -176,7 +176,7 @@ cpp_define_builtins (cpp_reader *pfile) cpp_define (pfile, "__GFORTRAN__=1"); cpp_define (pfile, "_LANGUAGE_FORTRAN=1"); - if (gfc_option.flag_openmp) + if (gfc_option.gfc_flag_openmp) cpp_define (pfile, "_OPENMP=200805"); @@ -526,7 +526,7 @@ gfc_cpp_post_options (void) cpp_option->traditional = 1; cpp_option->cplusplus_comments = 0; - cpp_option->pedantic = pedantic; + cpp_option->cpp_pedantic = pedantic; cpp_option->dollars_in_ident = gfc_option.flag_dollar_ok; cpp_option->discard_comments = gfc_cpp_option.discard_comments; @@ -1075,13 +1075,13 @@ cb_cpp_error (cpp_reader *pfile ATTRIBUT { diagnostic_info diagnostic; diagnostic_t dlevel; - bool save_warn_system_headers = global_dc->warn_system_headers; + bool save_warn_system_headers = global_dc->dc_warn_system_headers; bool ret; switch (level) { case CPP_DL_WARNING_SYSHDR: - global_dc->warn_system_headers = 1; + global_dc->dc_warn_system_headers = 1; /* Fall through. */ case CPP_DL_WARNING: dlevel = DK_WARNING; @@ -1112,7 +1112,7 @@ cb_cpp_error (cpp_reader *pfile ATTRIBUT diagnostic_override_option_index (&diagnostic, OPT_Wcpp); ret = report_diagnostic (&diagnostic); if (level == CPP_DL_WARNING_SYSHDR) - global_dc->warn_system_headers = save_warn_system_headers; + global_dc->dc_warn_system_headers = save_warn_system_headers; return ret; } Index: gcc/fortran/gfortran.h =================================================================== --- gcc/fortran/gfortran.h (revision 164599) +++ gcc/fortran/gfortran.h (working copy) @@ -2182,7 +2182,7 @@ typedef struct int warn_aliasing; int warn_ampersand; - int warn_conversion; + int gfc_warn_conversion; int warn_conversion_extra; int warn_implicit_interface; int warn_implicit_procedure; @@ -2222,7 +2222,7 @@ typedef struct int blas_matmul_limit; int flag_cray_pointer; int flag_d_lines; - int flag_openmp; + int gfc_flag_openmp; int flag_sign_zero; int flag_module_private; int flag_recursive; Index: gcc/fortran/scanner.c =================================================================== --- gcc/fortran/scanner.c (revision 164599) +++ gcc/fortran/scanner.c (working copy) @@ -1,6 +1,6 @@ /* Character scanner. - Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 - Free Software Foundation, Inc. + Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, + 2010 Free Software Foundation, Inc. Contributed by Andy Vaught This file is part of GCC. @@ -76,8 +76,6 @@ const char *gfc_source_file; static FILE *gfc_src_file; static gfc_char_t *gfc_src_preprocessor_lines[2]; -extern int pedantic; - static struct gfc_file_change { const char *filename; @@ -747,7 +745,7 @@ skip_free_comments (void) 2) handle OpenMP conditional compilation, where !$ should be treated as 2 spaces (for initial lines only if followed by space). */ - if (gfc_option.flag_openmp && at_bol) + if (gfc_option.gfc_flag_openmp && at_bol) { locus old_loc = gfc_current_locus; if (next_char () == '$') @@ -873,7 +871,7 @@ skip_fixed_comments (void) && continue_line < gfc_linebuf_linenum (gfc_current_locus.lb)) continue_line = gfc_linebuf_linenum (gfc_current_locus.lb); - if (gfc_option.flag_openmp) + if (gfc_option.gfc_flag_openmp) { if (next_char () == '$') { @@ -1814,7 +1812,7 @@ include_line (gfc_char_t *line) c = line; - if (gfc_option.flag_openmp) + if (gfc_option.gfc_flag_openmp) { if (gfc_current_form == FORM_FREE) { Index: gcc/fortran/f95-lang.c =================================================================== --- gcc/fortran/f95-lang.c (revision 164599) +++ gcc/fortran/f95-lang.c (working copy) @@ -1087,7 +1087,7 @@ gfc_init_builtin_functions (void) #include "../sync-builtins.def" #undef DEF_SYNC_BUILTIN - if (gfc_option.flag_openmp || flag_tree_parallelize_loops) + if (gfc_option.gfc_flag_openmp || flag_tree_parallelize_loops) { #undef DEF_GOMP_BUILTIN #define DEF_GOMP_BUILTIN(code, name, type, attr) \ Index: gcc/fortran/trans-decl.c =================================================================== --- gcc/fortran/trans-decl.c (revision 164599) +++ gcc/fortran/trans-decl.c (working copy) @@ -4681,7 +4681,7 @@ gfc_generate_function_code (gfc_namespac /* Reset recursion-check variable. */ if ((gfc_option.rtcheck & GFC_RTCHECK_RECURSION) && !is_recursive - && !gfc_option.flag_openmp + && !gfc_option.gfc_flag_openmp && recurcheckvar != NULL_TREE) { gfc_add_modify (&cleanup, recurcheckvar, boolean_false_node); Index: gcc/fortran/parse.c =================================================================== --- gcc/fortran/parse.c (revision 164599) +++ gcc/fortran/parse.c (working copy) @@ -693,7 +693,7 @@ next_free (void) return decode_gcc_attribute (); } - else if (c == '$' && gfc_option.flag_openmp) + else if (c == '$' && gfc_option.gfc_flag_openmp) { int i; @@ -780,7 +780,7 @@ next_fixed (void) return decode_gcc_attribute (); } - else if (c == '$' && gfc_option.flag_openmp) + else if (c == '$' && gfc_option.gfc_flag_openmp) { for (i = 0; i < 4; i++, c = gfc_next_char_literal (0)) gcc_assert ((char) gfc_wide_tolower (c) == "$omp"[i]); Index: gcc/fortran/options.c =================================================================== --- gcc/fortran/options.c (revision 164599) +++ gcc/fortran/options.c (working copy) @@ -87,7 +87,7 @@ gfc_init_options (unsigned int decoded_o gfc_option.warn_ampersand = 0; gfc_option.warn_character_truncation = 0; gfc_option.warn_array_temp = 0; - gfc_option.warn_conversion = 0; + gfc_option.gfc_warn_conversion = 0; gfc_option.warn_conversion_extra = 0; gfc_option.warn_implicit_interface = 0; gfc_option.warn_line_truncation = 0; @@ -128,7 +128,7 @@ gfc_init_options (unsigned int decoded_o gfc_option.blas_matmul_limit = 30; gfc_option.flag_cray_pointer = 0; gfc_option.flag_d_lines = -1; - gfc_option.flag_openmp = 0; + gfc_option.gfc_flag_openmp = 0; gfc_option.flag_sign_zero = 1; gfc_option.flag_recursive = 0; gfc_option.flag_init_integer = GFC_INIT_INTEGER_OFF; @@ -356,7 +356,7 @@ gfc_post_options (const char **pfilename gfc_option.flag_max_stack_var_size); else if (!gfc_option.flag_automatic && gfc_option.flag_recursive) gfc_warning_now ("Flag -fno-automatic overwrites -frecursive"); - else if (!gfc_option.flag_automatic && gfc_option.flag_openmp) + else if (!gfc_option.flag_automatic && gfc_option.gfc_flag_openmp) gfc_warning_now ("Flag -fno-automatic overwrites -frecursive implied by " "-fopenmp"); else if (gfc_option.flag_max_stack_var_size != -2 @@ -364,7 +364,7 @@ gfc_post_options (const char **pfilename gfc_warning_now ("Flag -frecursive overwrites -fmax-stack-var-size=%d", gfc_option.flag_max_stack_var_size); else if (gfc_option.flag_max_stack_var_size != -2 - && gfc_option.flag_openmp) + && gfc_option.gfc_flag_openmp) gfc_warning_now ("Flag -fmax-stack-var-size=%d overwrites -frecursive " "implied by -fopenmp", gfc_option.flag_max_stack_var_size); @@ -374,7 +374,7 @@ gfc_post_options (const char **pfilename gfc_option.flag_max_stack_var_size = -1; /* Implied -frecursive; implemented as -fmax-stack-var-size=-1. */ - if (gfc_option.flag_max_stack_var_size == -2 && gfc_option.flag_openmp + if (gfc_option.flag_max_stack_var_size == -2 && gfc_option.gfc_flag_openmp && gfc_option.flag_automatic) { gfc_option.flag_recursive = 1; @@ -418,7 +418,7 @@ set_Wall (int setting) { gfc_option.warn_aliasing = setting; gfc_option.warn_ampersand = setting; - gfc_option.warn_conversion = setting; + gfc_option.gfc_warn_conversion = setting; gfc_option.warn_line_truncation = setting; gfc_option.warn_surprising = setting; gfc_option.warn_tabs = !setting; @@ -580,7 +580,7 @@ gfc_handle_option (size_t scode, const c break; case OPT_Wconversion: - gfc_option.warn_conversion = value; + gfc_option.gfc_warn_conversion = value; break; case OPT_Wconversion_extra: @@ -706,7 +706,7 @@ gfc_handle_option (size_t scode, const c break; case OPT_fopenmp: - gfc_option.flag_openmp = value; + gfc_option.gfc_flag_openmp = value; break; case OPT_ffree_line_length_none: Index: gcc/alias.c =================================================================== --- gcc/alias.c (revision 164599) +++ gcc/alias.c (working copy) @@ -2688,7 +2688,7 @@ init_alias_target (void) = gen_rtx_ADDRESS (Pmode, arg_pointer_rtx); static_reg_base_value[FRAME_POINTER_REGNUM] = gen_rtx_ADDRESS (Pmode, frame_pointer_rtx); -#if HARD_FRAME_POINTER_REGNUM != FRAME_POINTER_REGNUM +#if !HARD_FRAME_POINTER_IS_FRAME_POINTER static_reg_base_value[HARD_FRAME_POINTER_REGNUM] = gen_rtx_ADDRESS (Pmode, hard_frame_pointer_rtx); #endif Index: gcc/emit-rtl.c =================================================================== --- gcc/emit-rtl.c (revision 164599) +++ gcc/emit-rtl.c (working copy) @@ -589,12 +589,12 @@ gen_rtx_REG (enum machine_mode mode, uns if (regno == FRAME_POINTER_REGNUM && (!reload_completed || frame_pointer_needed)) return frame_pointer_rtx; -#if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM +#if !HARD_FRAME_POINTER_IS_FRAME_POINTER if (regno == HARD_FRAME_POINTER_REGNUM && (!reload_completed || frame_pointer_needed)) return hard_frame_pointer_rtx; #endif -#if FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM && HARD_FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM +#if FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM && !HARD_FRAME_POINTER_IS_ARG_POINTER if (regno == ARG_POINTER_REGNUM) return arg_pointer_rtx; #endif Index: gcc/opth-gen.awk =================================================================== --- gcc/opth-gen.awk (revision 164599) +++ gcc/opth-gen.awk (working copy) @@ -75,10 +75,25 @@ print "" have_save = 0; +print "#ifndef GENERATOR_FILE" +print "struct gcc_options\n{" +print "#endif" + for (i = 0; i < n_extra_vars; i++) { var = extra_vars[i] sub(" *=.*", "", var) - print "extern " var ";" + orig_var = var + name = var + type = var + sub("^.*[ *]", "", name) + sub(" *" name "$", "", type) + var_seen[name] = 1 + print "#ifdef GENERATOR_FILE" + print "extern " orig_var ";" + print "#else" + print " " type " x_" name ";" + print "#define " name " global_options.x_" name + print "#endif" } for (i = 0; i < n_opts; i++) { @@ -93,8 +108,17 @@ for (i = 0; i < n_opts; i++) { continue; var_seen[name] = 1; + print "#ifdef GENERATOR_FILE" print "extern " var_type(flags[i]) name ";" + print "#else" + print " " var_type(flags[i]) "x_" name ";" + print "#define " name " global_options.x_" name + print "#endif" } +print "#ifndef GENERATOR_FILE" +print "};" +print "extern struct gcc_options global_options;" +print "#endif" print "" # All of the optimization switches gathered together so they can be saved and restored. @@ -114,8 +138,8 @@ n_opt_char = 2; n_opt_short = 0; n_opt_int = 0; n_opt_other = 0; -var_opt_char[0] = "unsigned char optimize"; -var_opt_char[1] = "unsigned char optimize_size"; +var_opt_char[0] = "unsigned char x_optimize"; +var_opt_char[1] = "unsigned char x_optimize_size"; for (i = 0; i < n_opts; i++) { if (flag_set_p("Optimization", flags[i])) { @@ -129,16 +153,16 @@ for (i = 0; i < n_opts; i++) { var_opt_seen[name]++; otype = var_type_struct(flags[i]); if (otype ~ "^((un)?signed +)?int *$") - var_opt_int[n_opt_int++] = otype name; + var_opt_int[n_opt_int++] = otype "x_" name; else if (otype ~ "^((un)?signed +)?short *$") - var_opt_short[n_opt_short++] = otype name; + var_opt_short[n_opt_short++] = otype "x_" name; else if (otype ~ "^((un)?signed +)?char *$") - var_opt_char[n_opt_char++] = otype name; + var_opt_char[n_opt_char++] = otype "x_" name; else - var_opt_other[n_opt_other++] = otype name; + var_opt_other[n_opt_other++] = otype "x_" name; } } @@ -198,20 +222,20 @@ if (have_save) { var_save_seen[name]++; otype = var_type_struct(flags[i]) if (otype ~ "^((un)?signed +)?int *$") - var_target_int[n_target_int++] = otype name; + var_target_int[n_target_int++] = otype "x_" name; else if (otype ~ "^((un)?signed +)?short *$") - var_target_short[n_target_short++] = otype name; + var_target_short[n_target_short++] = otype "x_" name; else if (otype ~ "^((un)?signed +)?char *$") - var_target_char[n_target_char++] = otype name; + var_target_char[n_target_char++] = otype "x_" name; else - var_target_other[n_target_other++] = otype name; + var_target_other[n_target_other++] = otype "x_" name; } } } else { - var_target_int[n_target_int++] = "int target_flags"; + var_target_int[n_target_int++] = "int x_target_flags"; } for (i = 0; i < n_target_other; i++) { Index: gcc/common.opt =================================================================== --- gcc/common.opt (revision 164599) +++ gcc/common.opt (working copy) @@ -647,7 +647,7 @@ Common Driver JoinedOrMissing RejectNega -fcompare-debug[=<opts>] Compile with and without e.g. -gtoggle, and compare the final-insns dump fcompare-debug-second -Common Driver RejectNegative Var(flag_compare_debug) +Common Driver RejectNegative Run only the second compilation of -fcompare-debug fconserve-stack Index: gcc/ira.c =================================================================== --- gcc/ira.c (revision 164599) +++ gcc/ira.c (working copy) @@ -1389,7 +1389,7 @@ ira_setup_eliminable_regset (void) else df_set_regs_ever_live (eliminables[i].from, true); } -#if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM +#if !HARD_FRAME_POINTER_IS_FRAME_POINTER if (!TEST_HARD_REG_BIT (crtl->asm_clobbers, HARD_FRAME_POINTER_REGNUM)) { SET_HARD_REG_BIT (eliminable_regset, HARD_FRAME_POINTER_REGNUM); Index: gcc/rtl.h =================================================================== --- gcc/rtl.h (revision 164599) +++ gcc/rtl.h (working copy) @@ -1980,6 +1980,16 @@ extern GTY(()) rtx const_tiny_rtx[3][(in #define HARD_FRAME_POINTER_REGNUM FRAME_POINTER_REGNUM #endif +#ifndef HARD_FRAME_POINTER_IS_FRAME_POINTER +#define HARD_FRAME_POINTER_IS_FRAME_POINTER \ + (HARD_FRAME_POINTER_REGNUM == FRAME_POINTER_REGNUM) +#endif + +#ifndef HARD_FRAME_POINTER_IS_ARG_POINTER +#define HARD_FRAME_POINTER_IS_ARG_POINTER \ + (HARD_FRAME_POINTER_REGNUM == ARG_POINTER_REGNUM) +#endif + /* Index labels for global_rtl. */ enum global_rtl_index { @@ -1993,13 +2003,13 @@ enum global_rtl_index #if FRAME_POINTER_REGNUM == ARG_POINTER_REGNUM GR_ARG_POINTER = GR_FRAME_POINTER, #endif -#if HARD_FRAME_POINTER_REGNUM == FRAME_POINTER_REGNUM +#if HARD_FRAME_POINTER_IS_FRAME_POINTER GR_HARD_FRAME_POINTER = GR_FRAME_POINTER, #else GR_HARD_FRAME_POINTER, #endif #if FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM -#if HARD_FRAME_POINTER_REGNUM == ARG_POINTER_REGNUM +#if HARD_FRAME_POINTER_IS_ARG_POINTER GR_ARG_POINTER = GR_HARD_FRAME_POINTER, #else GR_ARG_POINTER, Index: gcc/combine.c =================================================================== --- gcc/combine.c (revision 164599) +++ gcc/combine.c (working copy) @@ -962,7 +962,7 @@ create_log_links (void) /* Do not make the log link for frame pointer. */ if ((regno == FRAME_POINTER_REGNUM && (! reload_completed || frame_pointer_needed)) -#if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM +#if !HARD_FRAME_POINTER_IS_FRAME_POINTER || (regno == HARD_FRAME_POINTER_REGNUM && (! reload_completed || frame_pointer_needed)) #endif @@ -2049,7 +2049,7 @@ combinable_i3pat (rtx i3, rtx *loc, rtx && REG_P (subdest) && reg_referenced_p (subdest, PATTERN (i3)) && REGNO (subdest) != FRAME_POINTER_REGNUM -#if HARD_FRAME_POINTER_REGNUM != FRAME_POINTER_REGNUM +#if !HARD_FRAME_POINTER_IS_FRAME_POINTER && REGNO (subdest) != HARD_FRAME_POINTER_REGNUM #endif #if ARG_POINTER_REGNUM != FRAME_POINTER_REGNUM @@ -12802,7 +12802,7 @@ mark_used_regs_combine (rtx x) { /* None of this applies to the stack, frame or arg pointers. */ if (regno == STACK_POINTER_REGNUM -#if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM +#if !HARD_FRAME_POINTER_IS_FRAME_POINTER || regno == HARD_FRAME_POINTER_REGNUM #endif #if FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM Index: gcc/resource.c =================================================================== --- gcc/resource.c (revision 164599) +++ gcc/resource.c (working copy) @@ -1,6 +1,6 @@ /* Definitions for computing resource usage of specific insns. Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, - 2009 Free Software Foundation, Inc. + 2009, 2010 Free Software Foundation, Inc. This file is part of GCC. @@ -335,7 +335,7 @@ mark_referenced_resources (rtx x, struct if (frame_pointer_needed) { SET_HARD_REG_BIT (res->regs, FRAME_POINTER_REGNUM); -#if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM +#if !HARD_FRAME_POINTER_IS_FRAME_POINTER SET_HARD_REG_BIT (res->regs, HARD_FRAME_POINTER_REGNUM); #endif } @@ -1148,7 +1148,7 @@ init_resource_info (rtx epilogue_insn) if (frame_pointer_needed) { SET_HARD_REG_BIT (end_of_function_needs.regs, FRAME_POINTER_REGNUM); -#if HARD_FRAME_POINTER_REGNUM != FRAME_POINTER_REGNUM +#if !HARD_FRAME_POINTER_IS_FRAME_POINTER SET_HARD_REG_BIT (end_of_function_needs.regs, HARD_FRAME_POINTER_REGNUM); #endif if (! EXIT_IGNORE_STACK Index: gcc/reginfo.c =================================================================== --- gcc/reginfo.c (revision 164599) +++ gcc/reginfo.c (working copy) @@ -1,7 +1,7 @@ /* Compute different info about registers. Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, - 2009 Free Software Foundation, Inc. + 2009, 2010 Free Software Foundation, Inc. This file is part of GCC. @@ -487,7 +487,7 @@ init_reg_sets_1 (void) } else if (i == FRAME_POINTER_REGNUM) ; -#if HARD_FRAME_POINTER_REGNUM != FRAME_POINTER_REGNUM +#if !HARD_FRAME_POINTER_IS_FRAME_POINTER else if (i == HARD_FRAME_POINTER_REGNUM) ; #endif Index: gcc/c-parser.c =================================================================== --- gcc/c-parser.c (revision 164599) +++ gcc/c-parser.c (working copy) @@ -861,11 +861,11 @@ disable_extension_diagnostics (void) | (flag_iso << 3) | (warn_long_long << 4) | (warn_cxx_compat << 5)); - cpp_opts->pedantic = pedantic = 0; + cpp_opts->cpp_pedantic = pedantic = 0; warn_pointer_arith = 0; - cpp_opts->warn_traditional = warn_traditional = 0; + cpp_opts->cpp_warn_traditional = warn_traditional = 0; flag_iso = 0; - cpp_opts->warn_long_long = warn_long_long = 0; + cpp_opts->cpp_warn_long_long = warn_long_long = 0; warn_cxx_compat = 0; return ret; } @@ -876,11 +876,11 @@ disable_extension_diagnostics (void) static inline void restore_extension_diagnostics (int flags) { - cpp_opts->pedantic = pedantic = flags & 1; + cpp_opts->cpp_pedantic = pedantic = flags & 1; warn_pointer_arith = (flags >> 1) & 1; - cpp_opts->warn_traditional = warn_traditional = (flags >> 2) & 1; + cpp_opts->cpp_warn_traditional = warn_traditional = (flags >> 2) & 1; flag_iso = (flags >> 3) & 1; - cpp_opts->warn_long_long = warn_long_long = (flags >> 4) & 1; + cpp_opts->cpp_warn_long_long = warn_long_long = (flags >> 4) & 1; warn_cxx_compat = (flags >> 5) & 1; } Index: gcc/config/alpha/alpha.h =================================================================== --- gcc/config/alpha/alpha.h (revision 164599) +++ gcc/config/alpha/alpha.h (working copy) @@ -144,8 +144,6 @@ enum alpha_fp_trap_mode ALPHA_FPTM_SUI /* Software completion, w/underflow & inexact traps */ }; -extern int target_flags; - extern enum alpha_trap_precision alpha_tp; extern enum alpha_fp_rounding_mode alpha_fprm; extern enum alpha_fp_trap_mode alpha_fptm; Index: gcc/config/s390/s390.h =================================================================== --- gcc/config/s390/s390.h (revision 164599) +++ gcc/config/s390/s390.h (working copy) @@ -869,8 +869,6 @@ do { \ /* Position independent code. */ -extern int flag_pic; - #define PIC_OFFSET_TABLE_REGNUM (flag_pic ? 12 : INVALID_REGNUM) #define LEGITIMATE_PIC_OPERAND_P(X) legitimate_pic_operand_p (X) Index: gcc/config/spu/spu.h =================================================================== --- gcc/config/spu/spu.h (revision 164599) +++ gcc/config/spu/spu.h (working copy) @@ -24,9 +24,6 @@ #define INIT_EXPANDERS spu_init_expanders() -extern int target_flags; -extern const char *spu_fixed_range_string; - /* Which processor to generate code or schedule for. */ enum processor_type { Index: gcc/config/mep/mep.h =================================================================== --- gcc/config/mep/mep.h (revision 164599) +++ gcc/config/mep/mep.h (working copy) @@ -108,8 +108,6 @@ crtbegin.o%s" } \ while (0) -extern int target_flags; - /* Controlled by MeP-Integrator. */ #define TARGET_H1 0 Index: gcc/config/i386/i386.h =================================================================== --- gcc/config/i386/i386.h (revision 164599) +++ gcc/config/i386/i386.h (working copy) @@ -447,8 +447,6 @@ extern int x86_prefetch_sse; #define TARGET_ANY_GNU_TLS (TARGET_GNU_TLS || TARGET_GNU2_TLS) #define TARGET_SUN_TLS 0 -extern int ix86_isa_flags; - #ifndef TARGET_64BIT_DEFAULT #define TARGET_64BIT_DEFAULT 0 #endif Index: gcc/config/i386/i386-c.c =================================================================== --- gcc/config/i386/i386-c.c (revision 164599) +++ gcc/config/i386/i386-c.c (working copy) @@ -1,5 +1,5 @@ /* Subroutines used for macro/preprocessor support on the ia-32. - Copyright (C) 2008, 2009 + Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of GCC. @@ -297,8 +297,8 @@ ix86_pragma_target_parse (tree args, tre /* Figure out the previous/current isa, arch, tune and the differences. */ prev_opt = TREE_TARGET_OPTION (prev_tree); cur_opt = TREE_TARGET_OPTION (cur_tree); - prev_isa = prev_opt->ix86_isa_flags; - cur_isa = cur_opt->ix86_isa_flags; + prev_isa = prev_opt->x_ix86_isa_flags; + cur_isa = cur_opt->x_ix86_isa_flags; diff_isa = (prev_isa ^ cur_isa); prev_arch = (enum processor_type) prev_opt->arch; prev_tune = (enum processor_type) prev_opt->tune; Index: gcc/config/i386/i386.c =================================================================== --- gcc/config/i386/i386.c (revision 164599) +++ gcc/config/i386/i386.c (working copy) @@ -1898,7 +1898,6 @@ int x86_prefetch_sse; static int ix86_regparm; /* -mstackrealign option */ -extern int ix86_force_align_arg_pointer; static const char ix86_force_align_arg_pointer_string[] = "force_align_arg_pointer"; @@ -3857,7 +3856,7 @@ ix86_function_specific_print (FILE *file struct cl_target_option *ptr) { char *target_string - = ix86_target_string (ptr->ix86_isa_flags, ptr->target_flags, + = ix86_target_string (ptr->x_ix86_isa_flags, ptr->x_target_flags, NULL, NULL, NULL, false); fprintf (file, "%*sarch = %d (%s)\n", @@ -4114,8 +4113,8 @@ ix86_valid_target_attribute_tree (tree a ix86_option_override_internal, and then save the options away. The string options are are attribute options, and will be undone when we copy the save structure. */ - if (ix86_isa_flags != def->ix86_isa_flags - || target_flags != def->target_flags + if (ix86_isa_flags != def->x_ix86_isa_flags + || target_flags != def->x_target_flags || option_strings[IX86_FUNCTION_SPECIFIC_ARCH] || option_strings[IX86_FUNCTION_SPECIFIC_TUNE] || option_strings[IX86_FUNCTION_SPECIFIC_FPMATH]) @@ -4232,12 +4231,12 @@ ix86_can_inline_p (tree caller, tree cal /* Callee's isa options should a subset of the caller's, i.e. a SSE4 function can inline a SSE2 function but a SSE2 function can't inline a SSE4 function. */ - if ((caller_opts->ix86_isa_flags & callee_opts->ix86_isa_flags) - != callee_opts->ix86_isa_flags) + if ((caller_opts->x_ix86_isa_flags & callee_opts->x_ix86_isa_flags) + != callee_opts->x_ix86_isa_flags) ret = false; /* See if we have the same non-isa options. */ - else if (caller_opts->target_flags != callee_opts->target_flags) + else if (caller_opts->x_target_flags != callee_opts->x_target_flags) ret = false; /* See if arch, tune, etc. are the same. */ Index: gcc/config/sh/sh.h =================================================================== --- gcc/config/sh/sh.h (revision 164599) +++ gcc/config/sh/sh.h (working copy) @@ -503,8 +503,6 @@ extern enum sh_divide_strategy_e sh_div_ #define SUBTARGET_OVERRIDE_OPTIONS (void) 0 -extern const char *sh_fixed_range_str; - /* Target machine storage layout. */ Index: gcc/config/lm32/lm32.h =================================================================== --- gcc/config/lm32/lm32.h (revision 164599) +++ gcc/config/lm32/lm32.h (working copy) @@ -68,8 +68,6 @@ #undef LIB_SPEC #define LIB_SPEC "%{!T*:-T sim.ld}" -extern int target_flags; - /* Add -G xx support. */ #undef SWITCH_TAKES_ARG Index: gcc/config/cris/cris.h =================================================================== --- gcc/config/cris/cris.h (revision 164599) +++ gcc/config/cris/cris.h (working copy) @@ -280,9 +280,6 @@ extern int cris_cpu_version; } \ while (0) -/* This needs to be at least 32 bits. */ -extern int target_flags; - /* Previously controlled by target_flags. */ #define TARGET_ELF 1 Index: gcc/config/rs6000/rs6000.h =================================================================== --- gcc/config/rs6000/rs6000.h (revision 164599) +++ gcc/config/rs6000/rs6000.h (working copy) @@ -471,7 +471,6 @@ extern int rs6000_float_gprs; extern int rs6000_alignment_flags; extern const char *rs6000_sched_insert_nops_str; extern enum rs6000_nop_insertion rs6000_sched_insert_nops; -extern int rs6000_xilinx_fpu; /* Describe which vector unit to use for a given machine mode. */ enum rs6000_vector { @@ -2417,9 +2416,7 @@ extern char rs6000_reg_names[][8]; /* re /* #define MACHINE_no_sched_speculative_load */ /* General flags. */ -extern int flag_pic; extern int optimize; -extern int flag_expensive_optimizations; extern int frame_pointer_needed; /* Classification of the builtin functions to properly set the declaration tree Index: gcc/config/mcore/mcore.md =================================================================== --- gcc/config/mcore/mcore.md (revision 164599) +++ gcc/config/mcore/mcore.md (working copy) @@ -1,5 +1,5 @@ ;; Machine description the Motorola MCore -;; Copyright (C) 1993, 1999, 2000, 2004, 2005, 2007 +;; Copyright (C) 1993, 1999, 2000, 2004, 2005, 2007, 2009, 2010 ;; Free Software Foundation, Inc. ;; Contributed by Motorola. @@ -697,8 +697,6 @@ "" " { - extern int flag_omit_frame_pointer; - /* If this is an add to the frame pointer, then accept it as is so that we can later fold in the fp/sp offset from frame pointer elimination. */ Index: gcc/config/mcore/mcore.h =================================================================== --- gcc/config/mcore/mcore.h (revision 164599) +++ gcc/config/mcore/mcore.h (working copy) @@ -134,7 +134,6 @@ extern char * mcore_current_function_nam #define STACK_BOUNDARY (TARGET_8ALIGN ? 64 : 32) /* Largest increment in UNITS we allow the stack to grow in a single operation. */ -extern int mcore_stack_increment; #define STACK_UNITS_MAXSTEP 4096 /* Allocation boundary (in *bits*) for the code of a function. */ Index: gcc/config/score/score-conv.h =================================================================== --- gcc/config/score/score-conv.h (revision 164599) +++ gcc/config/score/score-conv.h (working copy) @@ -1,5 +1,5 @@ /* score-conv.h for Sunplus S+CORE processor - Copyright (C) 2005, 2007 Free Software Foundation, Inc. + Copyright (C) 2005, 2007, 2009, 2010 Free Software Foundation, Inc. This file is part of GCC. @@ -20,8 +20,6 @@ #ifndef GCC_SCORE_CONV_H #define GCC_SCORE_CONV_H -extern int target_flags; - #define GP_REG_FIRST 0U #define GP_REG_LAST 31U #define GP_REG_NUM (GP_REG_LAST - GP_REG_FIRST + 1U) Index: gcc/config/arm/arm.h =================================================================== --- gcc/config/arm/arm.h (revision 164599) +++ gcc/config/arm/arm.h (working copy) @@ -992,6 +992,9 @@ extern int arm_structure_size_boundary; ? ARM_HARD_FRAME_POINTER_REGNUM \ : THUMB_HARD_FRAME_POINTER_REGNUM) +#define HARD_FRAME_POINTER_IS_FRAME_POINTER 0 +#define HARD_FRAME_POINTER_IS_ARG_POINTER 0 + #define FP_REGNUM HARD_FRAME_POINTER_REGNUM /* Register to use for pushing function arguments. */ Index: gcc/config/mips/mips.h =================================================================== --- gcc/config/mips/mips.h (revision 164599) +++ gcc/config/mips/mips.h (working copy) @@ -1736,6 +1736,9 @@ enum mips_code_readable_setting { #define HARD_FRAME_POINTER_REGNUM \ (TARGET_MIPS16 ? GP_REG_FIRST + 17 : GP_REG_FIRST + 30) +#define HARD_FRAME_POINTER_IS_FRAME_POINTER 0 +#define HARD_FRAME_POINTER_IS_ARG_POINTER 0 + /* Register in which static-chain is passed to a function. */ #define STATIC_CHAIN_REGNUM (GP_REG_FIRST + 15) Index: gcc/config/mmix/mmix.h =================================================================== --- gcc/config/mmix/mmix.h (revision 164599) +++ gcc/config/mmix/mmix.h (working copy) @@ -140,8 +140,6 @@ struct GTY(()) machine_function } \ while (0) -extern int target_flags; - #define TARGET_DEFAULT \ (MASK_BRANCH_PREDICT | MASK_BASE_ADDRESSES | MASK_USE_RETURN_INSN) Index: gcc/config/bfin/bfin.h =================================================================== --- gcc/config/bfin/bfin.h (revision 164599) +++ gcc/config/bfin/bfin.h (working copy) @@ -72,10 +72,6 @@ extern unsigned int bfin_workarounds; /* Print subsidiary information on the compiler version in use. */ #define TARGET_VERSION fprintf (stderr, " (BlackFin bfin)") -/* Run-time compilation parameters selecting different hardware subsets. */ - -extern int target_flags; - /* Predefinition in the preprocessor for this target machine */ #ifndef TARGET_CPU_CPP_BUILTINS #define TARGET_CPU_CPP_BUILTINS() \ Index: gcc/stmt.c =================================================================== --- gcc/stmt.c (revision 164599) +++ gcc/stmt.c (working copy) @@ -1834,7 +1834,7 @@ expand_nl_goto_receiver (void) decrementing fp by STARTING_FRAME_OFFSET. */ emit_move_insn (virtual_stack_vars_rtx, hard_frame_pointer_rtx); -#if ARG_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM +#if !HARD_FRAME_POINTER_IS_ARG_POINTER if (fixed_regs[ARG_POINTER_REGNUM]) { #ifdef ELIMINABLE_REGS Index: gcc/reload1.c =================================================================== --- gcc/reload1.c (revision 164599) +++ gcc/reload1.c (working copy) @@ -831,7 +831,7 @@ reload (rtx first, int global) spill_hard_reg (from, 1); } -#if HARD_FRAME_POINTER_REGNUM != FRAME_POINTER_REGNUM +#if !HARD_FRAME_POINTER_IS_FRAME_POINTER if (frame_pointer_needed) spill_hard_reg (HARD_FRAME_POINTER_REGNUM, 1); #endif @@ -3232,7 +3232,7 @@ eliminate_regs_in_insn (rtx insn, int re for (ep = reg_eliminate; ep < ®_eliminate[NUM_ELIMINABLE_REGS]; ep++) if (ep->from_rtx == SET_DEST (old_set) && ep->can_eliminate) { -#if HARD_FRAME_POINTER_REGNUM != FRAME_POINTER_REGNUM +#if !HARD_FRAME_POINTER_IS_FRAME_POINTER /* If this is setting the frame pointer register to the hardware frame pointer register and this is an elimination that will be done (tested above), this insn is really Index: libcpp/directives.c =================================================================== --- libcpp/directives.c (revision 164599) +++ libcpp/directives.c (working copy) @@ -354,7 +354,7 @@ directive_diagnostics (cpp_reader *pfile cpp_error (pfile, CPP_DL_PEDWARN, "#%s is a GCC extension", dir->name); else if (((dir->flags & DEPRECATED) != 0 || (dir == &dtable[T_IMPORT] && !CPP_OPTION (pfile, objc))) - && CPP_OPTION (pfile, warn_deprecated)) + && CPP_OPTION (pfile, cpp_warn_deprecated)) cpp_warning (pfile, CPP_W_DEPRECATED, "#%s is a deprecated GCC extension", dir->name); } @@ -400,7 +400,7 @@ _cpp_handle_directive (cpp_reader *pfile if (was_parsing_args) { - if (CPP_OPTION (pfile, pedantic)) + if (CPP_OPTION (pfile, cpp_pedantic)) cpp_error (pfile, CPP_DL_PEDWARN, "embedding a directive within macro arguments is not portable"); pfile->state.parsing_args = 0; Index: libcpp/macro.c =================================================================== --- libcpp/macro.c (revision 164599) +++ libcpp/macro.c (working copy) @@ -1,7 +1,7 @@ /* Part of CPP library. (Macro and #define handling.) Copyright (C) 1986, 1987, 1989, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, - 2006, 2007, 2008, 2009 Free Software Foundation, Inc. + 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. Written by Per Bothner, 1994. Based on CCCP program by Paul Rubin, June 1986 Adapted to ANSI C, Richard Stallman, Jan 1987 @@ -1589,13 +1589,13 @@ parse_params (cpp_reader *pfile, cpp_mac pfile->spec_nodes.n__VA_ARGS__); pfile->state.va_args_ok = 1; if (! CPP_OPTION (pfile, c99) - && CPP_OPTION (pfile, pedantic) + && CPP_OPTION (pfile, cpp_pedantic) && CPP_OPTION (pfile, warn_variadic_macros)) cpp_pedwarning (pfile, CPP_W_VARIADIC_MACROS, "anonymous variadic macros were introduced in C99"); } - else if (CPP_OPTION (pfile, pedantic) + else if (CPP_OPTION (pfile, cpp_pedantic) && CPP_OPTION (pfile, warn_variadic_macros)) cpp_pedwarning (pfile, CPP_W_VARIADIC_MACROS, "ISO C does not permit named variadic macros"); Index: libcpp/include/cpplib.h =================================================================== --- libcpp/include/cpplib.h (revision 164599) +++ libcpp/include/cpplib.h (working copy) @@ -319,7 +319,7 @@ struct cpp_options unsigned char print_include_names; /* Nonzero means complain about deprecated features. */ - unsigned char warn_deprecated; + unsigned char cpp_warn_deprecated; /* Nonzero means warn if slash-star appears in a comment. */ unsigned char warn_comments; @@ -336,10 +336,10 @@ struct cpp_options /* Nonzero means warn about various incompatibilities with traditional C. */ - unsigned char warn_traditional; + unsigned char cpp_warn_traditional; /* Nonzero means warn about long long numeric constants. */ - unsigned char warn_long_long; + unsigned char cpp_warn_long_long; /* Nonzero means warn about text after an #endif (or #else). */ unsigned char warn_endif_labels; @@ -383,7 +383,7 @@ struct cpp_options unsigned char std; /* Nonzero means give all the error messages the ANSI standard requires. */ - unsigned char pedantic; + unsigned char cpp_pedantic; /* Nonzero means we're looking at already preprocessed code, so don't bother trying to do macro expansion and whatnot. */ Index: libcpp/init.c =================================================================== --- libcpp/init.c (revision 164599) +++ libcpp/init.c (working copy) @@ -160,8 +160,8 @@ cpp_create_reader (enum c_lang lang, has CPP_OPTION (pfile, operator_names) = 1; CPP_OPTION (pfile, warn_trigraphs) = 2; CPP_OPTION (pfile, warn_endif_labels) = 1; - CPP_OPTION (pfile, warn_deprecated) = 1; - CPP_OPTION (pfile, warn_long_long) = 0; + CPP_OPTION (pfile, cpp_warn_deprecated) = 1; + CPP_OPTION (pfile, cpp_warn_long_long) = 0; CPP_OPTION (pfile, dollars_in_ident) = 1; CPP_OPTION (pfile, warn_dollars) = 1; CPP_OPTION (pfile, warn_variadic_macros) = 1; @@ -698,7 +698,7 @@ post_options (cpp_reader *pfile) { /* -Wtraditional is not useful in C++ mode. */ if (CPP_OPTION (pfile, cplusplus)) - CPP_OPTION (pfile, warn_traditional) = 0; + CPP_OPTION (pfile, cpp_warn_traditional) = 0; /* Permanently disable macro expansion if we are rescanning preprocessed text. Read preprocesed source in ISO mode. */ Index: libcpp/expr.c =================================================================== --- libcpp/expr.c (revision 164599) +++ libcpp/expr.c (working copy) @@ -418,7 +418,7 @@ cpp_classify_number (cpp_reader *pfile, { int u_or_i = (result & (CPP_N_UNSIGNED|CPP_N_IMAGINARY)); int large = (result & CPP_N_WIDTH) == CPP_N_LARGE - && CPP_OPTION (pfile, warn_long_long); + && CPP_OPTION (pfile, cpp_warn_long_long); if (u_or_i || large) cpp_warning (pfile, large ? CPP_W_LONG_LONG : CPP_W_TRADITIONAL, @@ -427,7 +427,7 @@ cpp_classify_number (cpp_reader *pfile, } if ((result & CPP_N_WIDTH) == CPP_N_LARGE - && CPP_OPTION (pfile, warn_long_long)) + && CPP_OPTION (pfile, cpp_warn_long_long)) { const char *message = CPP_OPTION (pfile, cplusplus) ? N_("use of C++0x long long integer constant") @@ -814,7 +814,7 @@ eval_token (cpp_reader *pfile, const cpp if (CPP_PEDANTIC (pfile)) cpp_error (pfile, CPP_DL_PEDWARN, "assertions are a GCC extension"); - else if (CPP_OPTION (pfile, warn_deprecated)) + else if (CPP_OPTION (pfile, cpp_warn_deprecated)) cpp_warning (pfile, CPP_W_DEPRECATED, "assertions are a deprecated extension"); } Index: libcpp/internal.h =================================================================== --- libcpp/internal.h (revision 164599) +++ libcpp/internal.h (working copy) @@ -1,6 +1,6 @@ /* Part of CPP library. Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, - 2008, 2009 Free Software Foundation, Inc. + 2008, 2009, 2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the @@ -526,8 +526,8 @@ cpp_in_system_header (cpp_reader *pfile) { return pfile->buffer ? pfile->buffer->sysp : 0; } -#define CPP_PEDANTIC(PF) CPP_OPTION (PF, pedantic) -#define CPP_WTRADITIONAL(PF) CPP_OPTION (PF, warn_traditional) +#define CPP_PEDANTIC(PF) CPP_OPTION (PF, cpp_pedantic) +#define CPP_WTRADITIONAL(PF) CPP_OPTION (PF, cpp_warn_traditional) static inline int cpp_in_primary_file (cpp_reader *); static inline int