2010-06-11 Joseph Myers <joseph@codesourcery.com>
+ * common.opt (Wstrict-aliasing=, Wstrict-overflow=, fabi-version=,
+ flto-compression-level=, ftree-parallelize-loops=): Add
+ RejectNegative.
+
+2010-06-11 Joseph Myers <joseph@codesourcery.com>
+
* opts-common.c: Include options.h.
(integral_argument): Move from opts.c.
(decode_cmdline_option): New. Based on read_cmdline_option.
Warn about code which might break strict aliasing rules
Wstrict-aliasing=
-Common Joined UInteger Var(warn_strict_aliasing) Init(-1) Warning
+Common Joined RejectNegative UInteger Var(warn_strict_aliasing) Init(-1) Warning
Warn about code which might break strict aliasing rules
Wstrict-overflow
Warn about optimizations that assume that signed overflow is undefined
Wstrict-overflow=
-Common Joined UInteger Var(warn_strict_overflow) Init(-1) Warning
+Common Joined RejectNegative UInteger Var(warn_strict_overflow) Init(-1) Warning
Warn about optimizations that assume that signed overflow is undefined
Wsuggest-attribute=const
; Additional positive integers will be assigned as new versions of
; the ABI become the default version of the ABI.
fabi-version=
-Common Joined UInteger Var(flag_abi_version) Init(2)
+Common Joined RejectNegative UInteger Var(flag_abi_version) Init(2)
falign-functions
Common Report Var(align_functions,0) Optimization UInteger
; The initial value of -1 comes from Z_DEFAULT_COMPRESSION in zlib.h.
flto-compression-level=
-Common Joined UInteger Var(flag_lto_compression_level) Init(-1)
+Common Joined RejectNegative UInteger Var(flag_lto_compression_level) Init(-1)
-flto-compression-level=<number> Use zlib compression level <number> for IL
flto-report
Enable loop optimizations on tree level
ftree-parallelize-loops=
-Common Report Joined UInteger Var(flag_tree_parallelize_loops) Init(1)
+Common Report Joined RejectNegative UInteger Var(flag_tree_parallelize_loops) Init(1)
Enable automatic parallelization of loops
ftree-phiprop
2010-06-11 Joseph Myers <joseph@codesourcery.com>
+ * gcc.dg/opts-1.c: New test.
+
+2010-06-11 Joseph Myers <joseph@codesourcery.com>
+
* gcc.dg/funroll-loops-all.c: Update expected error.
2010-06-11 Uros Bizjak <ubizjak@gmail.com>
--- /dev/null
+/* Test negative forms of various options are rejected. */
+/* { dg-do compile } */
+/* { dg-options "-Wno-strict-aliasing=1 -Wno-strict-overflow=1 -fno-abi-version=1 -fno-lto-compression-level=1 -fno-tree-parallelize-loops=1" } */
+
+/* { dg-error "-fno-abi-version" "-fno-abi-version" { target *-*-* } 0 } */
+/* { dg-error "-fno-lto-compression-level" "-fno-lto-compression-level" { target *-*-* } 0 } */
+/* { dg-error "-fno-tree-parallelize-loops" "-fno-tree-parallelize-loops" { target *-*-* } 0 } */
+/* { dg-warning "-Wno-strict-overflow" "-Wno-strict-overflow" { target *-*-* } 0 } */
+/* { dg-warning "-Wno-strict-aliasing" "-Wno-strict-aliasing" { target *-*-* } 0 } */