Commit fcfbd84e by Joseph Myers Committed by Joseph Myers

common.opt (Wstrict-aliasing=, [...]): Add RejectNegative.

	* common.opt (Wstrict-aliasing=, Wstrict-overflow=, fabi-version=,
	flto-compression-level=, ftree-parallelize-loops=): Add
	RejectNegative.

testsuite:
	* gcc.dg/opts-1.c: New test.

From-SVN: r160640
parent 5d4b393f
2010-06-11 Joseph Myers <joseph@codesourcery.com> 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. * opts-common.c: Include options.h.
(integral_argument): Move from opts.c. (integral_argument): Move from opts.c.
(decode_cmdline_option): New. Based on read_cmdline_option. (decode_cmdline_option): New. Based on read_cmdline_option.
......
...@@ -173,7 +173,7 @@ Common Warning ...@@ -173,7 +173,7 @@ Common Warning
Warn about code which might break strict aliasing rules Warn about code which might break strict aliasing rules
Wstrict-aliasing= 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 Warn about code which might break strict aliasing rules
Wstrict-overflow Wstrict-overflow
...@@ -181,7 +181,7 @@ Common Warning ...@@ -181,7 +181,7 @@ Common Warning
Warn about optimizations that assume that signed overflow is undefined Warn about optimizations that assume that signed overflow is undefined
Wstrict-overflow= 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 Warn about optimizations that assume that signed overflow is undefined
Wsuggest-attribute=const Wsuggest-attribute=const
...@@ -305,7 +305,7 @@ Common Separate ...@@ -305,7 +305,7 @@ Common Separate
; Additional positive integers will be assigned as new versions of ; Additional positive integers will be assigned as new versions of
; the ABI become the default version of the ABI. ; the ABI become the default version of the ABI.
fabi-version= fabi-version=
Common Joined UInteger Var(flag_abi_version) Init(2) Common Joined RejectNegative UInteger Var(flag_abi_version) Init(2)
falign-functions falign-functions
Common Report Var(align_functions,0) Optimization UInteger Common Report Var(align_functions,0) Optimization UInteger
...@@ -794,7 +794,7 @@ Enable link-time optimization. ...@@ -794,7 +794,7 @@ Enable link-time optimization.
; The initial value of -1 comes from Z_DEFAULT_COMPRESSION in zlib.h. ; The initial value of -1 comes from Z_DEFAULT_COMPRESSION in zlib.h.
flto-compression-level= 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-compression-level=<number> Use zlib compression level <number> for IL
flto-report flto-report
...@@ -1338,7 +1338,7 @@ Common Report Var(flag_tree_loop_optimize) Init(1) Optimization ...@@ -1338,7 +1338,7 @@ Common Report Var(flag_tree_loop_optimize) Init(1) Optimization
Enable loop optimizations on tree level Enable loop optimizations on tree level
ftree-parallelize-loops= 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 Enable automatic parallelization of loops
ftree-phiprop ftree-phiprop
......
2010-06-11 Joseph Myers <joseph@codesourcery.com> 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. * gcc.dg/funroll-loops-all.c: Update expected error.
2010-06-11 Uros Bizjak <ubizjak@gmail.com> 2010-06-11 Uros Bizjak <ubizjak@gmail.com>
......
/* 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 } */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment