OSDN Git Service

Add TLS checks to ObjC
[pf3gnuchains/gcc-fork.git] / gcc / java / jcf-dump.c
index 0dfa4c2..b29c7e4 100644 (file)
@@ -2,13 +2,13 @@
    Functionally similar to Sun's javap.
 
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-   2006, 2007 Free Software Foundation, Inc.
+   2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
 GCC is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
+the Free Software Foundation; either version 3, or (at your option)
 any later version.
 
 GCC is distributed in the hope that it will be useful,
@@ -17,9 +17,8 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING.  If not, write to
-the Free Software Foundation, 51 Franklin Street, Fifth Floor,
-Boston, MA 02110-1301, USA.  
+along with GCC; see the file COPYING3.  If not see
+<http://www.gnu.org/licenses/>.  
 
 Java and all Java-based marks are trademarks or registered trademarks
 of Sun Microsystems, Inc. in the United States and other countries.
@@ -138,7 +137,7 @@ utf8_equal_string (JCF *jcf, int index, const char * value)
   if (flag_print_class_info) \
     fprintf (out, \
              "Magic number: 0x%0lx, minor_version: %ld, major_version: %ld.\n",\
-            (long) MAGIC, (long) MINOR, (long) MAJOR)
+            (unsigned long) MAGIC, (long) MINOR, (long) MAJOR)
 
 #define HANDLE_START_CONSTANT_POOL(COUNT) \
   if (flag_print_constant_pool) \
@@ -811,7 +810,7 @@ print_constant (FILE *out, JCF *jcf, int index, int verbosity)
          }
 
        if (verbosity > 1)
-         fprintf (out, ", bits = 0x%08lx", (long) JPOOL_UINT (jcf, index));
+         fprintf (out, ", bits = 0x%08lx", (unsigned long) JPOOL_UINT (jcf, index));
        
        break;
       }
@@ -851,16 +850,19 @@ print_constant (FILE *out, JCF *jcf, int index, int verbosity)
            if (dnum.mantissa0 == 0 && dnum.mantissa1 == 0)
              fputs ("Inf", out);
            else if (dnum.mantissa0 & JDOUBLE_QNAN_MASK)
-             fprintf (out, "QNaN(%llu)", (unsigned long long)mantissa);
+             fprintf (out, "QNaN(%" HOST_LONG_LONG_FORMAT "u)",
+                (unsigned long long)mantissa);
            else
-             fprintf (out, "SNaN(%llu)", (unsigned long long)mantissa);
+             fprintf (out, "SNaN(%" HOST_LONG_LONG_FORMAT "u)",
+                (unsigned long long)mantissa);
          }
        if (verbosity > 1)
          {
            int32 hi, lo;
            hi = JPOOL_UINT (jcf, index);
            lo = JPOOL_UINT (jcf, index + 1);
-           fprintf (out, ", bits = 0x%08lx%08lx", (long) hi, (long) lo);
+           fprintf (out, ", bits = 0x%08lx%08lx", (unsigned long) hi,
+                    (unsigned long) lo);
          }
        break;
       }
@@ -1164,8 +1166,8 @@ help (void)
 static void
 version (void)
 {
-  printf ("jcf-dump (GCC) %s\n\n", version_string);
-  printf ("Copyright %s 2006 Free Software Foundation, Inc.\n", _("(C)"));
+  printf ("jcf-dump %s%s\n\n", pkgversion_string, version_string);
+  printf ("Copyright %s 2010 Free Software Foundation, Inc.\n", _("(C)"));
   printf (_("This is free software; see the source for copying conditions.  There is NO\n"
            "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"));
   exit (0);
@@ -1303,7 +1305,6 @@ main (int argc, char** argv)
            {
              long compressed_size, member_size;
              int compression_method, filename_length, extra_length;
-             int general_purpose_bits;
              const char *filename;
              int total_length;
              if (flag_print_class_info)
@@ -1323,7 +1324,7 @@ main (int argc, char** argv)
                    }
                  JCF_FILL (jcf, 26);
                  JCF_SKIP (jcf, 2);
-                 general_purpose_bits = JCF_readu2_le (jcf);
+                 (void) /* general_purpose_bits = */ JCF_readu2_le (jcf);
                  compression_method = JCF_readu2_le (jcf);
                  JCF_SKIP (jcf, 8);
                  compressed_size = JCF_readu4_le (jcf);