gcc/gcc/java
Roger Sayle 4fa26a6079 flags.h (flag_wrapv): New flag controlling overflow semantics.
* 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
2003-05-31 13:23:32 +00:00
..
.cvsignore
boehm.c
buffer.c
buffer.h
builtins.c builtins.c (cos_builtin, [...]): Delete. 2003-05-29 16:38:04 +00:00
ChangeLog flags.h (flag_wrapv): New flag controlling overflow semantics. 2003-05-31 13:23:32 +00:00
chartables.h
check-init.c input.h (lineno): Rename to ... 2003-05-01 16:13:36 +00:00
class.c class.c (layout_class_method): Set DECL_EXTERNAL. 2003-05-13 10:41:17 -07:00
config-lang.in
constants.c tree.c (build_constructor): New function. 2003-04-13 01:45:35 +00:00
convert.h
decl.c class.c (layout_class_method): Set DECL_EXTERNAL. 2003-05-13 10:41:17 -07:00
except.c
expr.c input.h (lineno): Rename to ... 2003-05-01 16:13:36 +00:00
gcj.texi
gen-table.pl
gjavah.c re PR java/10491 (gcjh should make enclosing class a "friend" of inner classes) 2003-05-03 02:29:26 +00:00
java-except.h
java-opcodes.h
java-tree.def
java-tree.h class.c (layout_class_method): Set DECL_EXTERNAL. 2003-05-13 10:41:17 -07:00
javaop.def
javaop.h
jcf-depend.c
jcf-dump.c
jcf-io.c jcf-io.c (find_class): use DIR_SEPARATOR instead of '/' when computing java source filename 2003-04-20 22:45:02 +00:00
jcf-parse.c diagnostic.c (output_format): Add support for %m. 2003-05-13 18:06:52 +00:00
jcf-path.c
jcf-reader.c
jcf-write.c diagnostic.c (output_format): Add support for %m. 2003-05-13 18:06:52 +00:00
jcf.h [multiple changes] 2003-04-10 18:24:42 +00:00
jv-scan.c Make-lang.in (java/parse.o, [...]): Depend on input.h. 2003-05-04 14:05:15 +00:00
jvgenmain.c
jvspec.c
keyword.gperf
keyword.h
lang-options.h
lang-specs.h
lang.c flags.h (flag_wrapv): New flag controlling overflow semantics. 2003-05-31 13:23:32 +00:00
lex.c diagnostic.c (output_format): Add support for %m. 2003-05-13 18:06:52 +00:00
lex.h Make-lang.in (java/parse.o, [...]): Depend on input.h. 2003-05-04 14:05:15 +00:00
Make-lang.in Make-lang.in (java/parse.o, [...]): Depend on input.h. 2003-05-04 14:05:15 +00:00
mangle_name.c
mangle.c
parse-scan.y Makefile.in (TREE_H): Replace location.h with input.h. 2003-05-02 11:33:06 +00:00
parse.h input.h (lineno): Rename to ... 2003-05-01 16:13:36 +00:00
parse.y cfgloopanal.c (test_for_iteration): Use string concatentation on HOST_WIDE_INT_PRINT_* format specifier to collapse... 2003-05-17 01:40:45 +00:00
resource.c
typeck.c
verify.c
win32-host.c * win32-host.c: Normalize copyright boilerplate. 2003-05-23 18:18:49 +00:00
xref.c
xref.h
zextract.c
zipfile.h