aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/java/ChangeLog7
-rw-r--r--gcc/java/gjavah.c18
2 files changed, 13 insertions, 12 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index 287a8cc..50d79e5 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -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
diff --git a/gcc/java/gjavah.c b/gcc/java/gjavah.c
index 9db37d3..1f25ce6 100644
--- a/gcc/java/gjavah.c
+++ b/gcc/java/gjavah.c
@@ -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);
}