Deleted Added
full compact
3c3
< 2003
---
> 2003, 2004, 2005, 2006, 2007
20,21c20,21
< Software Foundation, 59 Temple Place - Suite 330, Boston, MA
< 02111-1307, USA. */
---
> Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
> 02110-1301, USA. */
25a26,27
> #include "options.h"
>
31d32
< DWARF_DEBUG, /* Write Dwarf debug info (using dwarfout.c). */
60,61c61,72
< /* Nonzero means emit debugging information only for symbols which are used. */
< extern int flag_debug_only_used_symbols;
---
> /* Enumerate visibility settings. This is deliberately ordered from most
> to least visibility. */
> #ifndef SYMBOL_VISIBILITY_DEFINED
> #define SYMBOL_VISIBILITY_DEFINED
> enum symbol_visibility
> {
> VISIBILITY_DEFAULT,
> VISIBILITY_PROTECTED,
> VISIBILITY_HIDDEN,
> VISIBILITY_INTERNAL
> };
> #endif
62a74,85
> /* The default visibility for all symbols (unless overridden). */
> extern enum symbol_visibility default_visibility;
>
> struct visibility_flags
> {
> unsigned inpragma : 1; /* True when in #pragma GCC visibility. */
> unsigned inlines_hidden : 1; /* True when -finlineshidden in effect. */
> };
>
> /* Global visibility options. */
> extern struct visibility_flags visibility_options;
>
71,88d93
< /* Don't print functions as they are compiled and don't print
< times taken by the various passes. -quiet. */
<
< extern int quiet_flag;
<
< /* Print memory still in use at end of compilation (which may have little
< to do with peak memory consumption). -fmem-report. */
<
< extern int mem_report;
<
< /* Don't print warning messages. -w. */
<
< extern bool inhibit_warnings;
<
< /* Don't suppress warnings from system headers. -Wsystem-headers. */
<
< extern bool warn_system_headers;
<
94,97d98
< /* If -Werror. */
<
< extern bool warnings_are_errors;
<
104,154d104
< extern bool warn_unused_function;
< extern bool warn_unused_label;
< extern bool warn_unused_parameter;
< extern bool warn_unused_variable;
< extern bool warn_unused_value;
<
< /* Nonzero to warn about code which is never reached. */
<
< extern bool warn_notreached;
<
< /* Nonzero means warn if inline function is too large. */
<
< extern bool warn_inline;
<
< /* Nonzero to warn about variables used before they are initialized. */
<
< extern int warn_uninitialized;
<
< /* Nonzero means warn about all declarations which shadow others. */
<
< extern bool warn_shadow;
<
< /* Warn if a switch on an enum, that does not have a default case,
< fails to have a case for every enum value. */
<
< extern bool warn_switch;
<
< /* Warn if a switch does not have a default case. */
<
< extern bool warn_switch_default;
<
< /* Warn if a switch on an enum fails to have a case for every enum
< value (regardless of the presence or otherwise of a default case). */
<
< extern bool warn_switch_enum;
<
< /* Nonzero means warn about function definitions that default the return type
< or that use a null return and have a return-type other than void. */
<
< extern int warn_return_type;
<
< /* Warn about functions which might be candidates for attribute noreturn. */
<
< extern bool warn_missing_noreturn;
<
< /* Nonzero means warn about pointer casts that increase the required
< alignment of the target type (and might therefore lead to a crash
< due to a misaligned access). */
<
< extern bool warn_cast_align;
<
162,183d111
< /* Warn if a function returns an aggregate,
< since there are often incompatible calling conventions for doing this. */
<
< extern bool warn_aggregate_return;
<
< /* Warn if packed attribute on struct is unnecessary and inefficient. */
<
< extern bool warn_packed;
<
< /* Warn when gcc pads a structure to an alignment boundary. */
<
< extern bool warn_padded;
<
< /* Warn when an optimization pass is disabled. */
<
< extern bool warn_disabled_optimization;
<
< /* Nonzero means warn about uses of __attribute__((deprecated))
< declarations. */
<
< extern bool warn_deprecated_decl;
<
187c115
< extern bool warn_strict_aliasing;
---
> extern int warn_strict_aliasing;
189c117,118
< /* Nonzero if generating code to do profiling. */
---
> /* Nonzero means warn about optimizations which rely on undefined
> signed overflow. */
191c120
< extern int profile_flag;
---
> extern int warn_strict_overflow;
193,225d121
< /* Nonzero if generating code to profile program flow graph arcs. */
<
< extern int profile_arc_flag;
<
< /* Nonzero if value profile should be measured. */
<
< extern int flag_profile_values;
<
< /* Nonzero if generating info for gcov to calculate line test coverage. */
<
< extern int flag_test_coverage;
<
< /* Nonzero indicates that branch taken probabilities should be calculated. */
<
< extern int flag_branch_probabilities;
<
< /* Nonzero if basic blocks should be reordered. */
<
< extern int flag_reorder_blocks;
<
< /* Nonzero if functions should be reordered. */
<
< extern int flag_reorder_functions;
<
< /* Nonzero if registers should be renamed. */
<
< extern int flag_rename_registers;
<
< /* Nonzero for -pedantic switch: warn about anything
< that standard C forbids. */
<
< extern int pedantic;
<
242c138,139
< /* Nonzero means give an enum type only as many bytes as it needs. */
---
> /* Nonzero means give an enum type only as many bytes as it needs. A value
> of 2 means it has not yet been initialized. */
246,251d142
< /* Nonzero for -fcaller-saves: allocate values in regs that need to
< be saved across function calls, if that produces overall better code.
< Optional now, so people can test it. */
<
< extern int flag_caller_saves;
<
256,370d146
< /* Nonzero for -fforce-mem: load memory value into a register
< before arithmetic on it. This makes better cse but slower compilation. */
<
< extern int flag_force_mem;
<
< /* Nonzero for -fforce-addr: load memory address into a register before
< reference to memory. This makes better cse but slower compilation. */
<
< extern int flag_force_addr;
<
< /* Nonzero for -fdefer-pop: don't pop args after each function call;
< instead save them up to pop many calls' args with one insns. */
<
< extern int flag_defer_pop;
<
< /* Nonzero for -ffloat-store: don't allocate floats and doubles
< in extended-precision registers. */
<
< extern int flag_float_store;
<
< /* Nonzero enables strength-reduction in loop.c. */
<
< extern int flag_strength_reduce;
<
< /* Nonzero enables loop unrolling in unroll.c. Only loops for which the
< number of iterations can be calculated at compile-time (UNROLL_COMPLETELY,
< UNROLL_MODULO) or at run-time (preconditioned to be UNROLL_MODULO) are
< unrolled. */
<
< extern int flag_old_unroll_loops;
<
< /* Nonzero enables loop unrolling in unroll.c. All loops are unrolled.
< This is generally not a win. */
<
< extern int flag_old_unroll_all_loops;
<
< /* Nonzero forces all invariant computations in loops to be moved
< outside the loop. */
<
< extern int flag_move_all_movables;
<
< /* Nonzero enables prefetch optimizations for arrays in loops. */
<
< extern int flag_prefetch_loop_arrays;
<
< /* Nonzero forces all general induction variables in loops to be
< strength reduced. */
<
< extern int flag_reduce_all_givs;
<
< /* Nonzero for -fcse-follow-jumps:
< have cse follow jumps to do a more extensive job. */
<
< extern int flag_cse_follow_jumps;
<
< /* Nonzero for -fcse-skip-blocks:
< have cse follow a branch around a block. */
<
< extern int flag_cse_skip_blocks;
<
< /* Nonzero for -fexpensive-optimizations:
< perform miscellaneous relatively-expensive optimizations. */
< extern int flag_expensive_optimizations;
<
< /* Nonzero for -fwritable-strings:
< store string constants in data segment and don't uniquize them. */
<
< extern int flag_writable_strings;
<
< /* Nonzero means don't put addresses of constant functions in registers.
< Used for compiling the Unix kernel, where strange substitutions are
< done on the assembly output. */
<
< extern int flag_no_function_cse;
<
< /* Nonzero for -fomit-frame-pointer:
< don't make a frame pointer in simple functions that don't require one. */
<
< extern int flag_omit_frame_pointer;
<
< /* Nonzero to inhibit use of define_optimization peephole opts. */
<
< extern int flag_no_peephole;
<
< /* Nonzero allows GCC to optimize sibling and tail recursive calls. */
<
< extern int flag_optimize_sibling_calls;
<
< /* Nonzero means the front end generally wants `errno' maintained by math
< operations, like built-in SQRT. */
<
< extern int flag_errno_math;
<
< /* Nonzero means that unsafe floating-point math optimizations are allowed
< for the sake of speed. IEEE compliance is not guaranteed, and operations
< are allowed to assume that their arguments and results are "normal"
< (e.g., nonnegative for SQRT). */
<
< extern int flag_unsafe_math_optimizations;
<
< /* Nonzero means that no NaNs or +-Infs are expected. */
<
< extern int flag_finite_math_only;
<
< /* Zero means that floating-point math operations cannot generate a
< (user-visible) trap. This is the case, for example, in nonstop
< IEEE 754 arithmetic. */
<
< extern int flag_trapping_math;
<
< /* Nonzero means disable transformations that assume default floating
< point rounding behavior. */
<
< extern int flag_rounding_math;
<
373c149
< 2 means C99-like requirements for complex divide (not yet implemented). */
---
> 2 means C99-like requirements for complex multiply and divide. */
375c151
< extern int flag_complex_divide_method;
---
> extern int flag_complex_method;
377,399d152
< /* Nonzero means to run loop optimizations twice. */
<
< extern int flag_rerun_loop_opt;
<
< /* Nonzero means make functions that look like good inline candidates
< go inline. */
<
< extern int flag_inline_functions;
<
< /* Nonzero for -fkeep-inline-functions: even if we make a function
< go inline everywhere, keep its definition around for debugging
< purposes. */
<
< extern int flag_keep_inline_functions;
<
< /* Nonzero means that functions declared `inline' will be treated
< as `static'. Prevents generation of zillions of copies of unused
< static inline functions; instead, `inlines' are written out
< only when actually used. Used in conjunction with -g. Also
< does the right thing with #pragma interface. */
<
< extern int flag_no_inline;
<
407c160
< extern int flag_syntax_only;
---
> extern int rtl_dump_and_exit;
413,469d165
< /* Nonzero means make the text shared if supported. */
<
< extern int flag_shared_data;
<
< /* flag_schedule_insns means schedule insns within basic blocks (before
< local_alloc).
< flag_schedule_insns_after_reload means schedule insns after
< global_alloc. */
<
< extern int flag_schedule_insns;
< extern int flag_schedule_insns_after_reload;
< extern int flag_sched2_use_superblocks;
< extern int flag_sched2_use_traces;
<
< /* The following flags have effect only for scheduling before register
< allocation:
<
< flag_schedule_interblock means schedule insns across basic blocks.
< flag_schedule_speculative means allow speculative motion of non-load insns.
< flag_schedule_speculative_load means allow speculative motion of some
< load insns.
< flag_schedule_speculative_load_dangerous allows speculative motion of more
< load insns. */
<
< extern int flag_schedule_interblock;
< extern int flag_schedule_speculative;
< extern int flag_schedule_speculative_load;
< extern int flag_schedule_speculative_load_dangerous;
<
< /* The following flags have an effect during scheduling after register
< allocation:
<
< sched_stalled_insns means that insns can be moved prematurely from the queue
< of stalled insns into the ready list.
<
< sched_stalled_insns_dep controls how many recently scheduled cycles will
< be examined for a dependency on a stalled insn that is candidate for
< premature removal from the queue of stalled insns into the ready list (has
< an effect only if the flag 'sched_stalled_insns' is set). */
<
< extern int flag_sched_stalled_insns;
< extern int flag_sched_stalled_insns_dep;
<
< /* flag_branch_on_count_reg means try to replace add-1,compare,branch tupple
< by a cheaper branch, on a count register. */
< extern int flag_branch_on_count_reg;
<
< /* This option is set to 1 on -fsingle-precision-constant option which is
< used to convert the floating point constants to single precision
< constants. */
<
< extern int flag_single_precision_constant;
<
< /* Nonzero means put things in delayed-branch slots if supported. */
<
< extern int flag_delayed_branch;
<
480,489d175
< /* Nonzero means generate position-independent code. 1 vs 2 for a
< target-dependent "small" or "large" mode. */
<
< extern int flag_pic;
<
< /* Nonzero if we are compiling position independent code for executable.
< 1 vs 2 for a target-dependent "small" or "large" mode. */
<
< extern int flag_pie;
<
495,536d180
< /* Nonzero means generate extra code for exception handling and enable
< exception handling. */
<
< extern int flag_exceptions;
<
< /* Nonzero means generate frame unwind info table when supported. */
<
< extern int flag_unwind_tables;
<
< /* Nonzero means generate frame unwind info table exact at each insn boundary. */
<
< extern int flag_asynchronous_unwind_tables;
<
< /* Nonzero means don't place uninitialized global data in common storage
< by default. */
<
< extern int flag_no_common;
<
< /* -finhibit-size-directive inhibits output of .size for ELF.
< This is used only for compiling crtstuff.c,
< and it may be extended to other effects
< needed for crtstuff.c on other systems. */
< extern int flag_inhibit_size_directive;
<
< /* Nonzero means place each function into its own section on those platforms
< which support arbitrary section names and unlimited numbers of sections. */
<
< extern int flag_function_sections;
<
< /* ... and similar for data. */
<
< extern int flag_data_sections;
<
< /* -fverbose-asm causes extra commentary information to be produced in
< the generated assembly code (to make it more readable). This option
< is generally only of use to those who actually need to read the
< generated assembly code (perhaps while debugging the compiler itself).
< -fno-verbose-asm, the default, causes the extra information
< to not be added and is useful when comparing two assembler files. */
<
< extern int flag_verbose_asm;
<
546c190
< extern int flag_dump_rtl_in_asm;
---
> /* Generate code for GNU or NeXT Objective-C runtime environment. */
548,550c192
< /* Greater than zero if user symbols are prepended by a leading underscore
< in generated assembly code. */
< extern int flag_leading_underscore;
---
> extern int flag_next_runtime;
552,553c194
< /* Tag all structures with __attribute__(packed) */
< extern int flag_pack_struct;
---
> extern int flag_dump_rtl_in_asm;
555,596d195
< /* This flag is only tested if alias checking is enabled.
< 0 if pointer arguments may alias each other. True in C.
< 1 if pointer arguments may not alias each other but may alias
< global variables.
< 2 if pointer arguments may not alias each other and may not
< alias global variables. True in Fortran.
< The value is ignored if flag_alias_check is 0. */
< extern int flag_argument_noalias;
<
< /* Nonzero if we should do (language-dependent) alias analysis.
< Typically, this analysis will assume that expressions of certain
< types do not alias expressions of certain other types. Only used
< if alias analysis (in general) is enabled. */
< extern int flag_strict_aliasing;
<
< /* Emit code to probe the stack, to help detect stack overflow; also
< may cause large objects to be allocated dynamically. */
< extern int flag_stack_check;
<
< /* Do the full regmove optimization pass. */
< extern int flag_regmove;
<
< /* Instrument functions with calls at entry and exit, for profiling. */
< extern int flag_instrument_function_entry_exit;
<
< /* Perform a peephole pass before sched2. */
< extern int flag_peephole2;
<
< /* Try to guess branch probabilities. */
< extern int flag_guess_branch_prob;
<
< /* -fcheck-bounds causes gcc to generate array bounds checks.
< For C, C++ and ObjC: defaults off.
< For Java: defaults to on.
< For Fortran: defaults to off. */
< extern int flag_bounds_check;
<
< /* This will attempt to merge constant section constants, if 1 only
< string constants and constants from constant pool, if 2 also constant
< variables. */
< extern int flag_merge_constants;
<
610,616d208
< /* Nonzero if the generated code should trap on signed overflow
< for PLUS / SUB / MULT. */
< extern int flag_trapv;
<
< /* Nonzero if the signed arithmetic overflow should wrap around. */
< extern int flag_wrapv;
<
629d220
< extern int align_loops;
632d222
< extern int align_jumps;
635d224
< extern int align_labels;
638d226
< extern int align_functions;
656,700d243
< /* Nonzero means ignore `#ident' directives. 0 means handle them.
< On SVR4 targets, it also controls whether or not to emit a
< string identifying the compiler. */
<
< extern int flag_no_ident;
<
< /* Nonzero means perform global CSE. */
<
< extern int flag_gcse;
<
< /* Nonzero if we want to perform enhanced load motion during gcse. */
<
< extern int flag_gcse_lm;
<
< /* Nonzero if we want to perform store motion after gcse. */
<
< extern int flag_gcse_sm;
<
< /* Nonzero if we want to perform redundant load-after-store elimination
< in gcse. */
<
< extern int flag_gcse_las;
<
< /* Nonzero if value histograms should be used to optimize code. */
< extern int flag_value_profile_transformations;
<
< /* Perform branch target register optimization before prologue / epilogue
< threading. */
<
< extern int flag_branch_target_load_optimize;
<
< /* Perform branch target register optimization after prologue / epilogue
< threading and jump2. */
<
< extern int flag_branch_target_load_optimize2;
<
<
< /* Nonzero means we should do dwarf2 duplicate elimination. */
<
< extern int flag_eliminate_dwarf2_dups;
<
< /* Nonzero means we should do unused type elimination. */
<
< extern int flag_eliminate_unused_debug_types;
<
705,717d247
< /* Nonzero means enable synchronous exceptions for non-call instructions. */
< extern int flag_non_call_exceptions;
<
< /* Nonzero means put zero initialized data in the bss section. */
< extern int flag_zero_initialized_in_bss;
<
< /* Nonzero means disable transformations observable by signaling NaNs. */
< extern int flag_signaling_nans;
<
< extern int flag_unit_at_a_time;
<
< extern int flag_web;
<
721a252,258
> /* Nonzero if we should track variables. */
> extern int flag_var_tracking;
>
> /* True if flag_speculative_prefetching was set by user. Used to suppress
> warning message in case flag was set by -fprofile-{generate,use}. */
> extern bool flag_speculative_prefetching_set;
>
727,741d263
< /* The version of the C++ ABI in use. The following values are
< allowed:
<
< 0: The version of the ABI believed most conformant with the
< C++ ABI specification. This ABI may change as bugs are
< discovered and fixed. Therefore, 0 will not necessarily
< indicate the same ABI in different versions of G++.
<
< 1: The version of the ABI first used in G++ 3.2.
<
< Additional positive integers will be assigned as new versions of
< the ABI become the default version of the ABI. */
<
< extern int flag_abi_version;
<
750c272
< x * 0 into x, are not correct for NaN operands, and are normally
---
> x * 0 into 0, are not correct for NaN operands, and are normally
773a296,344
> /* True if overflow wraps around for the given integral type. That
> is, TYPE_MAX + 1 == TYPE_MIN. */
> #define TYPE_OVERFLOW_WRAPS(TYPE) \
> (TYPE_UNSIGNED (TYPE) || flag_wrapv)
>
> /* True if overflow is undefined for the given integral type. We may
> optimize on the assumption that values in the type never overflow.
>
> IMPORTANT NOTE: Any optimization based on TYPE_OVERFLOW_UNDEFINED
> must issue a warning based on warn_strict_overflow. In some cases
> it will be appropriate to issue the warning immediately, and in
> other cases it will be appropriate to simply set a flag and let the
> caller decide whether a warning is appropriate or not. */
> #define TYPE_OVERFLOW_UNDEFINED(TYPE) \
> (!TYPE_UNSIGNED (TYPE) && !flag_wrapv && !flag_trapv && flag_strict_overflow)
>
> /* True if overflow for the given integral type should issue a
> trap. */
> #define TYPE_OVERFLOW_TRAPS(TYPE) \
> (!TYPE_UNSIGNED (TYPE) && flag_trapv)
>
> /* Names for the different levels of -Wstrict-overflow=N. The numeric
> values here correspond to N. */
>
> enum warn_strict_overflow_code
> {
> /* Overflow warning that should be issued with -Wall: a questionable
> construct that is easy to avoid even when using macros. Example:
> folding (x + CONSTANT > x) to 1. */
> WARN_STRICT_OVERFLOW_ALL = 1,
> /* Overflow warning about folding a comparison to a constant because
> of undefined signed overflow, other than cases covered by
> WARN_STRICT_OVERFLOW_ALL. Example: folding (abs (x) >= 0) to 1
> (this is false when x == INT_MIN). */
> WARN_STRICT_OVERFLOW_CONDITIONAL = 2,
> /* Overflow warning about changes to comparisons other than folding
> them to a constant. Example: folding (x + 1 > 1) to (x > 0). */
> WARN_STRICT_OVERFLOW_COMPARISON = 3,
> /* Overflow warnings not covered by the above cases. Example:
> folding ((x * 10) / 5) to (x * 2). */
> WARN_STRICT_OVERFLOW_MISC = 4,
> /* Overflow warnings about reducing magnitude of constants in
> comparison. Example: folding (x + 2 > y) to (x + 1 >= y). */
> WARN_STRICT_OVERFLOW_MAGNITUDE = 5
> };
>
> /* Whether to emit an overflow warning whose code is C. */
> #define issue_strict_overflow_warning(c) (warn_strict_overflow >= (int) (c))
>