00001 /* Compilation switch flag definitions for GCC. 00002 Copyright (C) 1987, 1988, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002, 00003 2003, 2004, 2005 00004 Free Software Foundation, Inc. 00005 00006 This file is part of GCC. 00007 00008 GCC is free software; you can redistribute it and/or modify it under 00009 the terms of the GNU General Public License as published by the Free 00010 Software Foundation; either version 2, or (at your option) any later 00011 version. 00012 00013 GCC is distributed in the hope that it will be useful, but WITHOUT ANY 00014 WARRANTY; without even the implied warranty of MERCHANTABILITY or 00015 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 00016 for more details. 00017 00018 You should have received a copy of the GNU General Public License 00019 along with GCC; see the file COPYING. If not, write to the Free 00020 Software Foundation, 59 Temple Place - Suite 330, Boston, MA 00021 02111-1307, USA. */ 00022 00023 #ifndef GCC_FLAGS_H 00024 #define GCC_FLAGS_H 00025 00026 #include "options.h" 00027 00028 enum debug_info_type 00029 { 00030 NO_DEBUG, /* Write no debug info. */ 00031 DBX_DEBUG, /* Write BSD .stabs for DBX (using dbxout.c). */ 00032 SDB_DEBUG, /* Write COFF for (old) SDB (using sdbout.c). */ 00033 DWARF2_DEBUG, /* Write Dwarf v2 debug info (using dwarf2out.c). */ 00034 XCOFF_DEBUG, /* Write IBM/Xcoff debug info (using dbxout.c). */ 00035 VMS_DEBUG, /* Write VMS debug info (using vmsdbgout.c). */ 00036 VMS_AND_DWARF2_DEBUG /* Write VMS debug info (using vmsdbgout.c). 00037 and DWARF v2 debug info (using dwarf2out.c). */ 00038 }; 00039 00040 /* Specify which kind of debugging info to generate. */ 00041 extern enum debug_info_type write_symbols; 00042 00043 /* Names of debug_info_type, for error messages. */ 00044 extern const char *const debug_type_names[]; 00045 00046 enum debug_info_level 00047 { 00048 DINFO_LEVEL_NONE, /* Write no debugging info. */ 00049 DINFO_LEVEL_TERSE, /* Write minimal info to support tracebacks only. */ 00050 DINFO_LEVEL_NORMAL, /* Write info for all declarations (and line table). */ 00051 DINFO_LEVEL_VERBOSE /* Write normal info plus #define/#undef info. */ 00052 }; 00053 00054 /* Specify how much debugging info to generate. */ 00055 extern enum debug_info_level debug_info_level; 00056 00057 /* Nonzero means use GNU-only extensions in the generated symbolic 00058 debugging information. */ 00059 extern bool use_gnu_debug_info_extensions; 00060 00061 /* Enumerate visibility settings. */ 00062 #ifndef SYMBOL_VISIBILITY_DEFINED 00063 #define SYMBOL_VISIBILITY_DEFINED 00064 enum symbol_visibility 00065 { 00066 VISIBILITY_DEFAULT, 00067 VISIBILITY_INTERNAL, 00068 VISIBILITY_HIDDEN, 00069 VISIBILITY_PROTECTED 00070 }; 00071 #endif 00072 00073 /* The default visibility for all symbols (unless overridden). */ 00074 extern enum symbol_visibility default_visibility; 00075 00076 struct visibility_flags 00077 { 00078 unsigned inpragma : 1; /* True when in #pragma GCC visibility. */ 00079 unsigned inlines_hidden : 1; /* True when -finlineshidden in effect. */ 00080 }; 00081 00082 /* Global visibility options. */ 00083 extern struct visibility_flags visibility_options; 00084 00085 /* Nonzero means do optimizations. -opt. */ 00086 00087 extern int optimize; 00088 00089 /* Nonzero means optimize for size. -Os. */ 00090 00091 extern int optimize_size; 00092 00093 /* Do print extra warnings (such as for uninitialized variables). 00094 -W/-Wextra. */ 00095 00096 extern bool extra_warnings; 00097 00098 #ifdef TARG_SL 00099 /* Supporting long long type. -mlong-long */ 00100 00101 extern bool Long_Long_Support; 00102 00103 /* Supporting float point emulation. -msoft-float */ 00104 00105 extern bool Float_Point_Support; 00106 #endif 00107 00108 /* Nonzero to warn about unused variables, functions et.al. Use 00109 set_Wunused() to update the -Wunused-* flags that correspond to the 00110 -Wunused option. */ 00111 00112 extern void set_Wunused (int setting); 00113 00114 /* Nonzero means warn about function definitions that default the return type 00115 or that use a null return and have a return-type other than void. */ 00116 00117 extern int warn_return_type; 00118 00119 /* Nonzero means warn about any objects definitions whose size is larger 00120 than N bytes. Also want about function definitions whose returned 00121 values are larger than N bytes. The value N is in `larger_than_size'. */ 00122 00123 extern bool warn_larger_than; 00124 extern HOST_WIDE_INT larger_than_size; 00125 00126 /* Nonzero means warn about constructs which might not be strict 00127 aliasing safe. */ 00128 00129 extern int warn_strict_aliasing; 00130 00131 /* Temporarily suppress certain warnings. 00132 This is set while reading code from a system header file. */ 00133 00134 extern int in_system_header; 00135 00136 /* Nonzero for -dp: annotate the assembly with a comment describing the 00137 pattern and alternative used. */ 00138 00139 extern int flag_print_asm_name; 00140 00141 /* Now the symbols that are set with `-f' switches. */ 00142 00143 /* Nonzero means `char' should be signed. */ 00144 00145 extern int flag_signed_char; 00146 00147 /* Nonzero means give an enum type only as many bytes as it needs. A value 00148 of 2 means it has not yet been initialized. */ 00149 00150 extern int flag_short_enums; 00151 00152 /* Nonzero for -fpcc-struct-return: return values the same way PCC does. */ 00153 00154 extern int flag_pcc_struct_return; 00155 00156 /* 0 means straightforward implementation of complex divide acceptable. 00157 1 means wide ranges of inputs must work for complex divide. 00158 2 means C99-like requirements for complex multiply and divide. */ 00159 00160 extern int flag_complex_method; 00161 00162 /* Nonzero means that we don't want inlining by virtue of -fno-inline, 00163 not just because the tree inliner turned us off. */ 00164 00165 extern int flag_really_no_inline; 00166 00167 /* Nonzero if we are only using compiler to check syntax errors. */ 00168 00169 extern int rtl_dump_and_exit; 00170 00171 /* Nonzero means we should save auxiliary info into a .X file. */ 00172 00173 extern int flag_gen_aux_info; 00174 00175 /* Nonzero means suppress output of instruction numbers and line number 00176 notes in debugging dumps. */ 00177 00178 extern int flag_dump_unnumbered; 00179 00180 /* Nonzero means change certain warnings into errors. 00181 Usually these are warnings about failure to conform to some standard. */ 00182 00183 extern int flag_pedantic_errors; 00184 00185 /* Nonzero if we are compiling code for a shared library, zero for 00186 executable. */ 00187 00188 extern int flag_shlib; 00189 00190 /* -dA causes debug information to be produced in 00191 the generated assembly code (to make it more readable). This option 00192 is generally only of use to those who actually need to read the 00193 generated assembly code (perhaps while debugging the compiler itself). 00194 Currently, this switch is only used by dwarfout.c; however, it is intended 00195 to be a catchall for printing debug information in the assembler file. */ 00196 00197 extern int flag_debug_asm; 00198 00199 extern int flag_dump_rtl_in_asm; 00200 00201 /* If one, renumber instruction UIDs to reduce the number of 00202 unused UIDs if there are a lot of instructions. If greater than 00203 one, unconditionally renumber instruction UIDs. */ 00204 extern int flag_renumber_insns; 00205 00206 /* Other basic status info about current function. */ 00207 00208 /* Nonzero means current function must be given a frame pointer. 00209 Set in stmt.c if anything is allocated on the stack there. 00210 Set in reload1.c if anything is allocated on the stack there. */ 00211 00212 extern int frame_pointer_needed; 00213 00214 /* Nonzero if subexpressions must be evaluated from left-to-right. */ 00215 extern int flag_evaluation_order; 00216 00217 /* Value of the -G xx switch, and whether it was passed or not. */ 00218 extern unsigned HOST_WIDE_INT g_switch_value; 00219 extern bool g_switch_set; 00220 00221 /* Values of the -falign-* flags: how much to align labels in code. 00222 0 means `use default', 1 means `don't align'. 00223 For each variable, there is an _log variant which is the power 00224 of two not less than the variable, for .align output. */ 00225 00226 extern int align_loops_log; 00227 extern int align_loops_max_skip; 00228 extern int align_jumps_log; 00229 extern int align_jumps_max_skip; 00230 extern int align_labels_log; 00231 extern int align_labels_max_skip; 00232 extern int align_functions_log; 00233 00234 /* Like align_functions_log above, but used by front-ends to force the 00235 minimum function alignment. Zero means no alignment is forced. */ 00236 extern int force_align_functions_log; 00237 00238 /* Nonzero if we dump in VCG format, not plain text. */ 00239 extern int dump_for_graph; 00240 00241 /* Selection of the graph form. */ 00242 enum graph_dump_types 00243 { 00244 no_graph = 0, 00245 vcg 00246 }; 00247 extern enum graph_dump_types graph_dump_format; 00248 00249 /* Nonzero means to collect statistics which might be expensive 00250 and to print them when we are done. */ 00251 extern int flag_detailed_statistics; 00252 00253 /* Nonzero means that we defer emitting functions until they are actually 00254 used. */ 00255 extern int flag_remove_unreachable_functions; 00256 00257 /* Nonzero if we should track variables. */ 00258 extern int flag_var_tracking; 00259 00260 /* True if flag_speculative_prefetching was set by user. Used to suppress 00261 warning message in case flag was set by -fprofile-{generate,use}. */ 00262 extern bool flag_speculative_prefetching_set; 00263 00264 /* A string that's used when a random name is required. NULL means 00265 to make it really random. */ 00266 00267 extern const char *flag_random_seed; 00268 00269 /* Returns TRUE if generated code should match ABI version N or 00270 greater is in use. */ 00271 00272 #define abi_version_at_least(N) \ 00273 (flag_abi_version == 0 || flag_abi_version >= (N)) 00274 00275 /* True if the given mode has a NaN representation and the treatment of 00276 NaN operands is important. Certain optimizations, such as folding 00277 x * 0 into x, are not correct for NaN operands, and are normally 00278 disabled for modes with NaNs. The user can ask for them to be 00279 done anyway using the -funsafe-math-optimizations switch. */ 00280 #define HONOR_NANS(MODE) \ 00281 (MODE_HAS_NANS (MODE) && !flag_finite_math_only) 00282 00283 /* Like HONOR_NANs, but true if we honor signaling NaNs (or sNaNs). */ 00284 #define HONOR_SNANS(MODE) (flag_signaling_nans && HONOR_NANS (MODE)) 00285 00286 /* As for HONOR_NANS, but true if the mode can represent infinity and 00287 the treatment of infinite values is important. */ 00288 #define HONOR_INFINITIES(MODE) \ 00289 (MODE_HAS_INFINITIES (MODE) && !flag_finite_math_only) 00290 00291 /* Like HONOR_NANS, but true if the given mode distinguishes between 00292 positive and negative zero, and the sign of zero is important. */ 00293 #define HONOR_SIGNED_ZEROS(MODE) \ 00294 (MODE_HAS_SIGNED_ZEROS (MODE) && !flag_unsafe_math_optimizations) 00295 00296 /* Like HONOR_NANS, but true if given mode supports sign-dependent rounding, 00297 and the rounding mode is important. */ 00298 #define HONOR_SIGN_DEPENDENT_ROUNDING(MODE) \ 00299 (MODE_HAS_SIGN_DEPENDENT_ROUNDING (MODE) && flag_rounding_math) 00300 00301 #endif /* ! GCC_FLAGS_H */
1.5.6