summaryrefslogtreecommitdiff
path: root/gcc/java
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/java')
-rw-r--r--gcc/java/ChangeLog9
-rw-r--r--gcc/java/Make-lang.in4
-rw-r--r--gcc/java/except.c26
-rw-r--r--gcc/java/lang.c1
4 files changed, 35 insertions, 5 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index e1135318f1b..0d50a7f4439 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,12 @@
+2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
+
+ * lang.c: Do not include except.h
+ * except.c: Likewise.
+ (doing_eh): New, moved from except.c (in gcc/) but removed the
+ do_warning flag.
+ (maybe_start_try): Update doing_eh call.
+ * Make-lang.in: Update dependencies.
+
2010-06-23 Anatoly Sokolov <aesok@post.ru>
* decl.c (java_init_decl_processing): Use double_int_to_tree instead
diff --git a/gcc/java/Make-lang.in b/gcc/java/Make-lang.in
index 26a81bab79a..5e240ed0743 100644
--- a/gcc/java/Make-lang.in
+++ b/gcc/java/Make-lang.in
@@ -285,7 +285,7 @@ java/decl.o: java/decl.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h \
libfuncs.h java/java-except.h $(GGC_H) $(REAL_H) gt-java-decl.h \
$(TARGET_H) $(CGRAPH_H) langhooks.h
java/except.o: java/except.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h $(REAL_H) \
- java/javaop.h java/java-opcodes.h except.h java/java-except.h \
+ java/javaop.h java/java-opcodes.h java/java-except.h \
toplev.h $(SYSTEM_H) coretypes.h
java/expr.o: java/expr.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h $(REAL_H) \
java/javaop.h java/java-opcodes.h \
@@ -302,7 +302,7 @@ java/jvgenmain.o: java/jvgenmain.c $(CONFIG_H) $(JAVA_TREE_H) $(SYSTEM_H) \
coretypes.h $(TM_H) intl.h
java/lang.o: java/lang.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h input.h \
toplev.h $(SYSTEM_H) coretypes.h $(TM_H) $(DIAGNOSTIC_H) \
- langhooks.h $(LANGHOOKS_DEF_H) gt-java-lang.h opts.h options.h $(EXCEPT_H)
+ langhooks.h $(LANGHOOKS_DEF_H) gt-java-lang.h opts.h options.h
java/mangle.o: java/mangle.c $(CONFIG_H) java/jcf.h $(JAVA_TREE_H) $(SYSTEM_H) \
coretypes.h $(TM_H) toplev.h $(GGC_H) gt-java-mangle.h $(LANGHOOKS_DEF_H)
java/mangle_name.o: java/mangle_name.c $(CONFIG_H) java/jcf.h $(JAVA_TREE_H) \
diff --git a/gcc/java/except.c b/gcc/java/except.c
index f5a64071204..2c3aead1a4c 100644
--- a/gcc/java/except.c
+++ b/gcc/java/except.c
@@ -31,7 +31,6 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
#include "javaop.h"
#include "java-opcodes.h"
#include "jcf.h"
-#include "except.h" /* for doing_eh. */
#include "java-except.h"
#include "toplev.h"
#include "tree-iterator.h"
@@ -565,6 +564,29 @@ check_start_handlers (struct eh_range *range, int pc)
}
+/* Routine to see if exception handling is turned on.
+ DO_WARN is nonzero if we want to inform the user that exception
+ handling is turned off.
+
+ This is used to ensure that -fexceptions has been specified if the
+ compiler tries to use any exception-specific functions. */
+
+static inline int
+doing_eh (void)
+{
+ if (! flag_exceptions)
+ {
+ static int warned = 0;
+ if (! warned)
+ {
+ error ("exception handling disabled, use -fexceptions to enable");
+ warned = 1;
+ }
+ return 0;
+ }
+ return 1;
+}
+
static struct eh_range *current_range;
/* Emit any start-of-try-range starting at start_pc and ending after
@@ -574,7 +596,7 @@ void
maybe_start_try (int start_pc, int end_pc)
{
struct eh_range *range;
- if (! doing_eh (1))
+ if (! doing_eh ())
return;
range = find_handler (start_pc);
diff --git a/gcc/java/lang.c b/gcc/java/lang.c
index 351952de1a6..6c31947c6a4 100644
--- a/gcc/java/lang.c
+++ b/gcc/java/lang.c
@@ -43,7 +43,6 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
#include "tree-dump.h"
#include "opts.h"
#include "options.h"
-#include "except.h" /* For USING_SJLJ_EXCEPTIONS. */
static bool java_init (void);
static void java_finish (void);