OSDN Git Service

Add options -Wunused-variable, -Wunused-function, -Wunused-label,
[pf3gnuchains/gcc-fork.git] / gcc / flags.h
index ba05720..3c543bc 100644 (file)
@@ -1,5 +1,6 @@
 /* Compilation switch flag definitions for GNU CC.
-   Copyright (C) 1987, 88, 94, 95, 96, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1987, 1988, 1994, 1995, 1996, 1997, 1998, 1999, 2000
+   Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -19,7 +20,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.  */
 
 /* Name of the input .c file being compiled.  */
-extern char *main_input_filename;
+extern const char *main_input_filename;
 
 enum debug_info_type
 {
@@ -53,10 +54,9 @@ extern int use_gnu_debug_info_extensions;
 
 extern int optimize;
 
-/* Nonzero means do stupid register allocation.  -noreg.
-   Currently, this is 1 if `optimize' is 0.  */
+/* Nonzero means optimize for size.  -Os.  */
 
-extern int obey_regdecls;
+extern int optimize_size;
 
 /* Don't print functions as they are compiled and don't print
    times taken by the various passes.  -quiet.  */
@@ -71,9 +71,21 @@ extern int inhibit_warnings;
 
 extern int extra_warnings;
 
-/* Nonzero to warn about unused local variables.  */
+/* Nonzero to warn about unused variables, functions et.al.  Use
+   set_Wunused() to update the -Wunused-* flags that correspond to the
+   -Wunused option. */
 
-extern int warn_unused;
+extern void set_Wunused PARAMS ((int setting));
+
+extern int warn_unused_function;
+extern int warn_unused_label;
+extern int warn_unused_parameter;
+extern int warn_unused_variable;
+extern int warn_unused_value;
+
+/* Nonzero to warn about code which is never reached.  */
+
+extern int warn_notreached;
 
 /* Nonzero means warn if inline function is too large.  */
 
@@ -83,6 +95,14 @@ extern int warn_inline;
 
 extern int warn_uninitialized;
 
+/* Zero if unknown pragmas are ignored
+   One if the compiler should warn about an unknown pragma not in
+   a system include file.
+   Greater than one if the compiler should warn for all unknown
+   pragmas.  */
+
+extern int warn_unknown_pragmas;
+
 /* Nonzero means warn about all declarations which shadow others.   */
 
 extern int warn_shadow;
@@ -102,29 +122,32 @@ extern int warn_return_type;
 
 extern int warn_cast_align;
 
-/* Nonzero means warn that dbx info for template class methods isn't fully
-   supported yet.  */
-
-extern int warn_template_debugging;
-
 /* Nonzero means warn about any identifiers that match in the first N
    characters.  The value N is in `id_clash_len'.  */
 
 extern int warn_id_clash;
-extern unsigned id_clash_len;
+extern int id_clash_len;
 
 /* Nonzero means warn about any objects definitions whose size is larger
    than N bytes.  Also want about function definitions whose returned
    values are larger than N bytes. The value N is in `larger_than_size'.  */
 
 extern int warn_larger_than;
-extern unsigned larger_than_size;
+extern HOST_WIDE_INT larger_than_size;
 
 /* Warn if a function returns an aggregate,
    since there are often incompatible calling conventions for doing this.  */
 
 extern int warn_aggregate_return;
 
+/* Warn if packed attribute on struct is unnecessary and inefficient.  */
+
+extern int warn_packed;
+
+/* Warn when gcc pads a structure to an alignment boundary.  */
+
+extern int warn_padded;
+
 /* Nonzero if generating code to do profiling.  */
 
 extern int profile_flag;
@@ -264,10 +287,14 @@ extern int flag_no_peephole;
 
 extern int flag_volatile;
 
-/* Nonzero means treat all global and extern variables as global.  */
+/* Nonzero means treat all global and extern variables as volatile.  */
 
 extern int flag_volatile_global;
 
+/* Nonzero means treat all static variables as volatile.  */
+
+extern int flag_volatile_static;
+
 /* Nonzero allows GCC to violate some IEEE or ANSI rules regarding math
    operations in the interest of optimization.  For example it allows
    GCC to assume arguments to sqrt are nonnegative numbers, allowing
@@ -275,6 +302,21 @@ extern int flag_volatile_global;
 
 extern int flag_fast_math;
 
+/* 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, unless overridden by flag_fast_math.  */
+
+extern int flag_errno_math;
+
+/* 0 means straightforward implementation of complex divide acceptable.
+   1 means wide ranges of inputs must work for complex divide.
+   2 means C9X-like requirements for complex divide (not yet implemented).  */
+
+extern int flag_complex_divide_method;
+
 /* Nonzero means to run loop optimizations twice.  */
 
 extern int flag_rerun_loop_opt;
@@ -318,7 +360,6 @@ extern int flag_shared_data;
 extern int flag_schedule_insns;
 extern int flag_schedule_insns_after_reload;
 
-#ifdef HAIFA
 /* The following flags have effect only for scheduling before register
    allocation:
 
@@ -327,29 +368,27 @@ extern int flag_schedule_insns_after_reload;
    flag_schedule_speculative_load means allow speculative motion of some
    load insns.
    flag_schedule_speculative_load_dangerous allows speculative motion of more
-   load insns.
-   flag_schedule_reverse_before_reload means try to reverse original order
-   of insns (S).
-   flag_schedule_reverse_after_reload means try to reverse original order
-   of insns (R).  */
+   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;
-extern int flag_schedule_reverse_before_reload;
-extern int flag_schedule_reverse_after_reload;
 
 /* flag_on_branch_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;
-#endif  /* HAIFA */
 
 
 /* Nonzero means put things in delayed-branch slots if supported. */
 
 extern int flag_delayed_branch;
 
+/* Nonzero means suppress output of instruction numbers and line number
+   notes in debugging dumps.  */
+
+extern int flag_dump_unnumbered;
+
 /* Nonzero means pretend it is OK to examine bits of target floats,
    even if that isn't true.  The resulting code will have incorrect constants,
    but the same series of instructions that the native compiler would make.  */
@@ -371,6 +410,15 @@ extern int flag_pic;
 
 extern int flag_exceptions;
 
+/* Nonzero means use the new model for exception handling. Replaces 
+   -DNEW_EH_MODEL as a compile option. */
+
+extern int flag_new_exceptions;
+
+/* Nonzero means generate frame unwind info table when supported */
+
+extern int flag_unwind_tables;
+
 /* Nonzero means don't place uninitialized global data in common storage
    by default.  */
 
@@ -387,11 +435,15 @@ extern int flag_inhibit_size_directive;
 
 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).
-   -fverbose-asm is the default.  -fno-verbose-asm causes the extra information
+   -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;
@@ -412,10 +464,6 @@ extern int flag_gnu_linker;
 /* Tag all structures with __attribute__(packed) */
 extern int flag_pack_struct;
 
-/* 1 if alias checking is enabled: symbols do not alias each other
-   and parameters do not alias the current stack frame.  */
-extern int flag_alias_check;
-
 /* 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
@@ -425,9 +473,44 @@ extern int flag_alias_check;
    The value is ignored if flag_alias_check is 0.  */
 extern int flag_argument_noalias;
 
-/* Emit code to check for stack overflow; also may cause large objects
-   to be allocated dynamically.  */
+/* 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;
+
+/* -fbounded-pointers causes gcc to compile pointers as composite
+   objects occupying three words: the pointer value, the base address
+   of the referent object, and the address immediately beyond the end
+   of the referent object.  The base and extent allow us to perform
+   runtime bounds checking.  -fbounded-pointers implies -fcheck-bounds.  */
+extern int flag_bounded_pointers;
+
+/* -fcheck-bounds causes gcc to generate array bounds checks.
+   For C, C++: defaults to value of flag_bounded_pointers.
+   For ObjC: defaults to off.
+   For Java: defaults to on.
+   For Fortran: defaults to off.
+   For CHILL: defaults to off.  */
+extern int flag_bounds_check;
+
+/* If one, renumber instruction UIDs to reduce the number of
+   unused UIDs if there are a lot of instructions.  If greater than
+   one, unconditionally renumber instruction UIDs.  */
+extern int flag_renumber_insns;
 \f
 /* Other basic status info about current function.  */
 
@@ -442,16 +525,6 @@ extern int frame_pointer_needed;
 
 extern int can_reach_end;
 
-/* Nonzero if function being compiled receives nonlocal gotos
-   from nested functions.  */
-
-extern int current_function_has_nonlocal_label;
-
-/* Nonzero if function being compiled has nonlocal gotos to parent
-   function.  */
-
-extern int current_function_has_nonlocal_goto;
-
 /* Nonzero if GCC must add code to check memory access (used by Checker).  */
 
 extern int flag_check_memory_usage;
@@ -460,6 +533,42 @@ extern int flag_check_memory_usage;
    flag_check_memory_usage).  */
 
 extern int flag_prefix_function_name;
-/* Nonzero if the current function is a thunk, so we should try to cut
-   corners where we can.  */
-extern int current_function_is_thunk;
+
+/* Value of the -G xx switch, and whether it was passed or not.  */
+extern int g_switch_value;
+extern int g_switch_set;
+
+/* Value of the -finline-limit flag.  */
+
+extern int inline_max_insns;
+
+/* Values of the -falign-* flags: how much to align labels in code. 
+   0 means `use default', 1 means `don't align'.  
+   For each variable, there is an _log variant which is the power
+   of two not less than the variable, for .align output.  */
+
+extern int align_loops;
+extern int align_loops_log;
+extern int align_jumps;
+extern int align_jumps_log;
+extern int align_labels;
+extern int align_labels_log;
+extern int align_functions;
+extern int align_functions_log;
+
+/* Nonzero if we dump in VCG format, not plain text.  */
+extern int dump_for_graph;
+
+/* Selection of the graph form.  */
+enum graph_dump_types
+{
+  no_graph = 0,
+  vcg
+};
+extern enum graph_dump_types graph_dump_format;
+
+/* 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;