aboutsummaryrefslogtreecommitdiff
path: root/gcc/opts.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/opts.c')
-rw-r--r--gcc/opts.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/gcc/opts.c b/gcc/opts.c
index 8b422f07efc..a365d652c73 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -797,9 +797,8 @@ decode_options (unsigned int argc, const char **argv)
if (optimize_size)
{
- /* Inlining of very small functions usually reduces total size. */
- set_param_value ("max-inline-insns-single", 5);
- set_param_value ("max-inline-insns-auto", 5);
+ /* Inlining of functions reducing size is a good idea regardless
+ of them being declared inline. */
flag_inline_functions = 1;
/* We want to crossjump as much as possible. */
@@ -1354,6 +1353,9 @@ common_handle_option (size_t scode, const char *arg, int value,
break;
case OPT_Wstrict_aliasing:
+ set_Wstrict_aliasing (value);
+ break;
+
case OPT_Wstrict_aliasing_:
warn_strict_aliasing = value;
break;
@@ -1721,6 +1723,20 @@ set_Wunused (int setting)
warn_unused_value = setting;
}
+/* Used to set the level of strict aliasing warnings,
+ when no level is specified (i.e., when -Wstrict-aliasing, and not
+ -Wstrict-aliasing=level was given).
+ ONOFF is assumed to take value 1 when -Wstrict-aliasing is specified,
+ and 0 otherwise. After calling this function, wstrict_aliasing will be
+ set to the default value of -Wstrict_aliasing=level, currently 3. */
+void
+set_Wstrict_aliasing (int onoff)
+{
+ gcc_assert (onoff == 0 || onoff == 1);
+ if (onoff != 0)
+ warn_strict_aliasing = 3;
+}
+
/* The following routines are useful in setting all the flags that
-ffast-math and -fno-fast-math imply. */
void