This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug java/17779] ICE: Seg fault



------- Comment #11 from dominiq at lps dot ens dot fr  2008-01-04 15:06 -------
rebuilding java fails with:

...
/opt/gcc/i686-darwin/./prev-gcc/xgcc -B/opt/gcc/i686-darwin/./prev-gcc/
-B/opt/gcc/gcc4.3w/i686-apple-darwin9/bin/ -c   -g -O2 -fomit-frame-pointer
-DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
-Wold-style-definition -Wmissing-format-attribute -pedantic -Wno-long-long
-Wno-variadic-macros                                    
-Wno-overlength-strings -Werror -fno-common   -DHAVE_CONFIG_H -I. -Ijava
-I../../gcc-4.3-work/gcc -I../../gcc-4.3-work/gcc/java
-I../../gcc-4.3-work/gcc/../include -I./../intl
-I../../gcc-4.3-work/gcc/../libcpp/include -I/sw/include 
-I../../gcc-4.3-work/gcc/../libdecnumber
-I../../gcc-4.3-work/gcc/../libdecnumber/dpd -I../libdecnumber   
../../gcc-4.3-work/gcc/java/jcf-parse.c -o java/jcf-parse.o
cc1: warnings being treated as errors
../../gcc-4.3-work/gcc/java/jcf-parse.c: In function 'parse_zip_file_entries':
../../gcc-4.3-work/gcc/java/jcf-parse.c:2079: error: ISO C90 forbids mixed
declarations and code
make[3]: *** [java/jcf-parse.o] Error 1
make[2]: *** [all-stage2-gcc] Error 2
make[1]: *** [stage2-bubble] Error 2
make: *** [all] Error 2

The following patch fixes the problem:

--- ../_gcc_clean/gcc/java/jcf-parse.c  2008-01-04 15:33:37.000000000 +0100
+++ ../gcc-4.3-work/gcc/java/jcf-parse.c        2008-01-04 16:01:18.000000000
+0100
@@ -2061,6 +2061,7 @@
 {
   struct ZipDirectory *zdir;
   int i;
+  int previous_alias_set;

   for (i = 0, zdir = (ZipDirectory *)localToFile->central_directory;
        i < localToFile->count; i++, zdir = ZIPDIR_NEXT (zdir))
@@ -2076,7 +2077,7 @@
          {
            char *class_name = compute_class_name (zdir);
            class = lookup_class (get_identifier (class_name));
-           int previous_alias_set = -1;
+           previous_alias_set = -1;
            FREE (class_name);
            current_jcf = TYPE_JCF (class);


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17779


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]