summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2010-06-12 00:13:23 +0000
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2010-06-12 00:13:23 +0000
commit212cc99595429d7cd2324428c028e061bb15856b (patch)
tree395560cde6eb88b3477005877671c260daf9cce5
parent06907f2532ec470c983b61c93bf8d35c786a73db (diff)
downloadgcc-212cc99595429d7cd2324428c028e061bb15856b.tar.gz
* common.opt (Wstrict-aliasing=, Wstrict-overflow=, fabi-version=,
flto-compression-level=, ftree-parallelize-loops=): Add RejectNegative. testsuite: * gcc.dg/opts-1.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160640 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/common.opt10
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gcc.dg/opts-1.c9
4 files changed, 24 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index a2e6acecd15..4c5d32b1a91 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,11 @@
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.
diff --git a/gcc/common.opt b/gcc/common.opt
index f001e026fc9..dc9b342e0ea 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -173,7 +173,7 @@ Common Warning
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
@@ -181,7 +181,7 @@ Common Warning
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
@@ -305,7 +305,7 @@ Common Separate
; 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
@@ -794,7 +794,7 @@ Enable link-time optimization.
; 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
@@ -1338,7 +1338,7 @@ Common Report Var(flag_tree_loop_optimize) Init(1) Optimization
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
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index b6d4be9b5e2..4d2a83da63f 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,9 @@
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>
diff --git a/gcc/testsuite/gcc.dg/opts-1.c b/gcc/testsuite/gcc.dg/opts-1.c
new file mode 100644
index 00000000000..0d16c3ded6e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/opts-1.c
@@ -0,0 +1,9 @@
+/* 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 } */