4fa26a6079
* flags.h (flag_wrapv): New flag controlling overflow semantics. * toplev.c (flag_wrapv): Declare the variable with default false. (lang_independent_options): New option "-fwrapv" to set the above. * fold-const.c (extract_muldiv_1): Disable optimization of (2*x)/2 as x, when signed arithmetic overflow wraps around. (fold): Optimize "-A - B" as "-B - A" if overflow wraps around. * loop.c (basic_induction_var): Ignore BIVs that rely on undefined overflow when flag_wrapv is true. * java/lang.c (java_init_options): Prescribe wrap-around two's complement arithmetic overflow by setting flag_wrapv. * doc/invoke.texi: Document new -fwrapv command line option. * doc/c-tree.texi: Mention that the overflow semantics of NEGATE_EXPR, PLUS_EXPR, MINUS_EXPR and MULT_EXPR is dependent upon both flag_wrapv and flag_trapv. * gcc.dg/fwrapv-1.c: New test case. * gcc.dg/fwrapv-2.c: New test case. * libjava.lang/Overflow.java: New test. * libjava.lang/Overflow.out: New file. From-SVN: r67270 |
||
---|---|---|
.. | ||
.cvsignore | ||
boehm.c | ||
buffer.c | ||
buffer.h | ||
builtins.c | ||
ChangeLog | ||
chartables.h | ||
check-init.c | ||
class.c | ||
config-lang.in | ||
constants.c | ||
convert.h | ||
decl.c | ||
except.c | ||
expr.c | ||
gcj.texi | ||
gen-table.pl | ||
gjavah.c | ||
java-except.h | ||
java-opcodes.h | ||
java-tree.def | ||
java-tree.h | ||
javaop.def | ||
javaop.h | ||
jcf-depend.c | ||
jcf-dump.c | ||
jcf-io.c | ||
jcf-parse.c | ||
jcf-path.c | ||
jcf-reader.c | ||
jcf-write.c | ||
jcf.h | ||
jv-scan.c | ||
jvgenmain.c | ||
jvspec.c | ||
keyword.gperf | ||
keyword.h | ||
lang-options.h | ||
lang-specs.h | ||
lang.c | ||
lex.c | ||
lex.h | ||
Make-lang.in | ||
mangle_name.c | ||
mangle.c | ||
parse-scan.y | ||
parse.h | ||
parse.y | ||
resource.c | ||
typeck.c | ||
verify.c | ||
win32-host.c | ||
xref.c | ||
xref.h | ||
zextract.c | ||
zipfile.h |