From 22f8a068527c072cc53956db18f3ef94d5224fbd Mon Sep 17 00:00:00 2001 From: Mark Mitchell Date: Tue, 1 Feb 2005 17:13:08 +0000 Subject: [PATCH] revert: gjavah.c (print_field_info): Mark static data members of floating-point type with "__extension__". Revert: 2005-01-31 Mark Mitchell * gjavah.c (print_field_info): Mark static data members of floating-point type with "__extension__". From-SVN: r94547 --- gcc/java/ChangeLog | 7 +++++++ gcc/java/gjavah.c | 18 ++++++------------ 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 287a8ccb4f6..50d79e5289b 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,10 @@ +2005-02-01 Mark Mitchell + + Revert: + 2005-01-31 Mark Mitchell + * gjavah.c (print_field_info): Mark static data members of + floating-point type with "__extension__". + 2005-01-31 Mark Mitchell * gjavah.c (print_field_info): Mark static data members of diff --git a/gcc/java/gjavah.c b/gcc/java/gjavah.c index 9db37d38a9b..1f25ce62610 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); } -- 2.30.2