aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/lang.c
diff options
context:
space:
mode:
authorAlexandre Petit-Bianco <apbianco@cygnus.com>2000-08-24 01:44:00 +0000
committerAlexandre Petit-Bianco <apbianco@gcc.gnu.org>2000-08-23 18:44:00 -0700
commit5f1c312aa06c452609c7fab1cf390dde6dfb8722 (patch)
treecd7ce89a24dfddf5ffd3d4ad167f1f4b902ed92c /gcc/java/lang.c
parente15a68e7bc302166f1f90c83fe0ef64fe0d45820 (diff)
downloadgcc-5f1c312aa06c452609c7fab1cf390dde6dfb8722.zip
gcc-5f1c312aa06c452609c7fab1cf390dde6dfb8722.tar.gz
gcc-5f1c312aa06c452609c7fab1cf390dde6dfb8722.tar.bz2
java-tree.h (flag_extraneous_semicolon): New extern.
2000-08-08 Alexandre Petit-Bianco <apbianco@cygnus.com> * java-tree.h (flag_extraneous_semicolon): New extern. * lang-options.h: (-Wextraneous-semicolon): New option. * lang.c (flag_redundant): Fixed typo in leading comment. (flag_extraneous_semicolon): New global. (lang_decode_option): Set `flag_extraneous_semicolon' when -Wall. Decode `-Wextraneous-semicolon'. * parse.y (type_declaration:): Removed `SC_TK' hack, added `empty_statement' rule. (class_body_declaration): Likewise. (method_body:): Accept `;' as a method body. (static_initializer:): Removed `SC_TK' hack. (constructor_block_end:): Likewise. (empty_statement:): Report deprecated empty declaration. Fixes gcj/295 (Fix to gcj/295: http://sources.redhat.com/ml/java-prs/2000-q3/msg00095.html) From-SVN: r35929
Diffstat (limited to 'gcc/java/lang.c')
-rw-r--r--gcc/java/lang.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/java/lang.c b/gcc/java/lang.c
index c86b568..ae03896 100644
--- a/gcc/java/lang.c
+++ b/gcc/java/lang.c
@@ -98,7 +98,7 @@ int flag_emit_xref = 0;
/* When non zero, -Wall was turned on. */
int flag_wall = 0;
-/* When non zero, check for redundant modifier uses. */
+/* When non zero, check for redundant modifier uses. */
int flag_redundant = 0;
/* When non zero, warns about overridings that don't occur. */
@@ -121,6 +121,9 @@ int flag_hash_synchronization;
JNI, not CNI. */
int flag_jni = 0;
+/* When non zero, report the now deprecated empty statements. */
+int flag_extraneous_semicolon;
+
/* From gcc/flags.h, and indicates if exceptions are turned on or not. */
extern int flag_new_exceptions;
@@ -256,6 +259,7 @@ lang_decode_option (argc, argv)
{
flag_wall = 1;
flag_redundant = 1;
+ flag_extraneous_semicolon = 1;
/* When -Wall given, enable -Wunused. We do this because the C
compiler does it, and people expect it. */
set_Wunused (1);
@@ -274,6 +278,12 @@ lang_decode_option (argc, argv)
return 1;
}
+ if (strcmp (p, "-Wextraneous-semicolon") == 0)
+ {
+ flag_extraneous_semicolon = 1;
+ return 1;
+ }
+
if (strcmp (p, "-MD") == 0)
{
jcf_dependency_init (1);