From b124f72e29e5b0ff7b6cbd85fab0e9d4676d7b9f Mon Sep 17 00:00:00 2001 From: Alexandre Petit-Bianco Date: Fri, 23 Mar 2001 11:42:25 -0800 Subject: re PR java/1213 (gcj should check for incorrect CLASSPATH) 2001-03-22 Alexandre Petit-Bianco * gcj.texi (Input Options): documented the check for attribute `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag. * java-tree.h (flag_force_classes_archive_check): Declared extern. * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro. (jcf_parse): Check for the right classes archive if necessary. * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it. (jcf_parse_fields): Fixed indentation. * jcf-write.c (append_gcj_attribute): New function. (generate_classfile): Compute the attribute count, invoke `append_gcj_attribute'. * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source' turned into bit fields. New bit field `right_zip.' (JCF_ZERO): Set `right_zip' to zero. * lang-options.h (-fforce-classes-archive-check): Added flag. * lang.c (flag_force_classes_archive_check): New flag. (lang_f_options): New entry `force-classes-archive-check.' Fixes PR java/1213. (http://gcc.gnu.org/ml/gcc-patches/2001-03/msg01662.html) From-SVN: r40788 --- gcc/java/lang.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gcc/java/lang.c') diff --git a/gcc/java/lang.c b/gcc/java/lang.c index 38aedc7..8f9f5b2 100644 --- a/gcc/java/lang.c +++ b/gcc/java/lang.c @@ -147,6 +147,9 @@ const char *current_encoding = NULL; /* When non zero, report the now deprecated empty statements. */ int flag_extraneous_semicolon; +/* When non zero, always check for a non gcj generated classes archive. */ +int flag_force_classes_archive_check; + /* From gcc/flags.h, and indicates if exceptions are turned on or not. */ extern int flag_new_exceptions; @@ -169,6 +172,7 @@ lang_f_options[] = {"hash-synchronization", &flag_hash_synchronization, 1}, {"jni", &flag_jni, 1}, {"check-references", &flag_check_references, 1}, + {"force-classes-archive-check", &flag_force_classes_archive_check, 1} }; static struct string_option -- cgit v1.1