OSDN Git Service

Revert:
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 1 Feb 2005 17:13:08 +0000 (17:13 +0000)
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 1 Feb 2005 17:13:08 +0000 (17:13 +0000)
2005-01-31  Mark Mitchell  <mark@codesourcery.com>
* gjavah.c (print_field_info): Mark static data members of
floating-point type with "__extension__".

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@94547 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/java/ChangeLog
gcc/java/gjavah.c

index 287a8cc..50d79e5 100644 (file)
@@ -1,3 +1,10 @@
+2005-02-01  Mark Mitchell  <mark@codesourcery.com>
+
+       Revert:
+       2005-01-31  Mark Mitchell  <mark@codesourcery.com>
+       * gjavah.c (print_field_info): Mark static data members of
+       floating-point type with "__extension__".
+
 2005-01-31  Mark Mitchell  <mark@codesourcery.com>
 
        * gjavah.c (print_field_info): Mark static data members of
index 9db37d3..1f25ce6 100644 (file)
@@ -768,6 +768,8 @@ print_field_info (FILE *stream, JCF* jcf, int name_index, int sig_index,
          print_cxx_classname (stream, "#define ", jcf, jcf->this_class, 1);
          fputs ("_", stream);
        }
+      else
+       fputs ("static ", stream);
 
       if ((flags & ACC_FINAL) && current_field_value > 0)
        {
@@ -781,7 +783,7 @@ print_field_info (FILE *stream, JCF* jcf, int name_index, int sig_index,
                jint num;
                int most_negative = 0;
                if (! flag_jni)
-                 fputs ("static const jint ", stream);
+                 fputs ("const jint ", stream);
                print_field_name (stream, jcf, name_index, 0);
                fputs (flag_jni ? " " : " = ", stream);
                num = JPOOL_INT (jcf, current_field_value);
@@ -803,7 +805,7 @@ print_field_info (FILE *stream, JCF* jcf, int name_index, int sig_index,
                jlong num;
                int most_negative = 0;
                if (! flag_jni)
-                 fputs ("static const jlong ", stream);
+                 fputs ("const jlong ", stream);
                print_field_name (stream, jcf, name_index, 0);
                fputs (flag_jni ? " " : " = ", stream);
                num = JPOOL_LONG (jcf, current_field_value);
@@ -824,11 +826,7 @@ print_field_info (FILE *stream, JCF* jcf, int name_index, int sig_index,
              {
                jfloat fnum = JPOOL_FLOAT (jcf, current_field_value);
                if (! flag_jni)
-                 /* ISO C++ does not allow initialization of a static
-                    data member of floating-point type.  Thus, this
-                    code is making use of an undocumented GNU C++
-                    extension.  */
-                 fputs ("__extension__ static const jfloat ", stream);
+                 fputs ("const jfloat ", stream);
                print_field_name (stream, jcf, name_index, 0);
                jni_print_float (stream, fnum);
              }
@@ -837,11 +835,7 @@ print_field_info (FILE *stream, JCF* jcf, int name_index, int sig_index,
              {
                jdouble dnum = JPOOL_DOUBLE (jcf, current_field_value);
                if (! flag_jni)
-                 /* ISO C++ does not allow initialization of a static
-                    data member of floating-point type.  Thus, this
-                    code is making use of an undocumented GNU C++
-                    extension.  */
-                 fputs ("__extension__ static const jdouble ", stream);
+                 fputs ("const jdouble ", stream);
                print_field_name (stream, jcf, name_index, 0);
                jni_print_double (stream, dnum);
              }