jcf-io.c (caching_stat): Use __extension__ to avoid pedantic warning.
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>
Thu, 3 Mar 2005 00:27:03 +0000 (00:27 +0000)
committerKaveh Ghazi <ghazi@gcc.gnu.org>
Thu, 3 Mar 2005 00:27:03 +0000 (00:27 +0000)
* jcf-io.c (caching_stat): Use __extension__ to avoid pedantic
warning.
* Make-lang.in: Don't elide warnings in jcf-io.c.

From-SVN: r95819

gcc/java/ChangeLog
gcc/java/Make-lang.in
gcc/java/jcf-io.c

index 96dd3af364e71093f5eef71da08a17a92bd377fa..0fd4364f0b94000eb1a85b07fa274c64a9a463a3 100644 (file)
@@ -1,3 +1,9 @@
+2005-03-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * jcf-io.c (caching_stat): Use __extension__ to avoid pedantic
+       warning.
+       * Make-lang.in: Don't elide warnings in jcf-io.c.
+
 2005-03-01  Per Bothner  <per@bothner.com>
 
        PR java/8608
index 26970e8f1dff697c58a31ba4b04471c44f2508ef..ccdc38e7a4f8ed1a89bb1d2107caf51085ac802c 100644 (file)
@@ -129,9 +129,6 @@ jvspec.o-warn = -Wno-error
 java/parse-scan.o-warn = -Wno-error
 java/parse.o-warn = -Wno-error
 
-# Use of non-standardized scandir
-java/jcf-io.o-warn = -Wno-error
-
 jc1$(exeext): $(JAVA_OBJS) $(BACKEND) $(LIBDEPS)
        rm -f $@
        $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \
index e0ab03e14cf6d4dbd9ea5cb6f92cd09d1106eaaf..6588ef2444112ac9d0930702248e1565b7976b47 100644 (file)
@@ -376,11 +376,11 @@ caching_stat (char *filename, struct stat *buf)
         particular, the type of the function pointer passed as the
         third argument sometimes takes a "const struct dirent *"
         parameter, and sometimes just a "struct dirent *".  We cast
-        to (void *) so that either way it is quietly accepted.
-        FIXME: scandir is not in POSIX.  */
-      dent->num_files = scandir (filename, &dent->files, 
-                                (void *) java_or_class_file, 
-                                alphasort);
+        to (void *) and use __extension__ so that either way it is
+        quietly accepted.  FIXME: scandir is not in POSIX.  */
+      dent->num_files = __extension__ scandir (filename, &dent->files, 
+                                              (void *) java_or_class_file, 
+                                              alphasort);
       *slot = dent;
     }
   else