For PR java/6005 and PR java/7611:
authorTom Tromey <tromey@redhat.com>
Thu, 22 Aug 2002 00:41:28 +0000 (00:41 +0000)
committerTom Tromey <tromey@gcc.gnu.org>
Thu, 22 Aug 2002 00:41:28 +0000 (00:41 +0000)
* lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define.
(java_can_use_bit_fields_p): New function.

From-SVN: r56497

gcc/java/ChangeLog
gcc/java/lang.c

index 962e409edc942fd4a04268766eb79f9b3bb63d2d..7535b5f9e1040f4fc98b2d452de7c62ab1599433 100644 (file)
@@ -1,3 +1,9 @@
+2002-08-21  Tom Tromey  <tromey@redhat.com>
+
+       For PR java/6005 and PR java/7611:
+       * lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define.
+       (java_can_use_bit_fields_p): New function.
+
 2002-08-16  Tom Tromey  <tromey@redhat.com>
 
        * gcj.texi (Class Initialization): Mention class initialization of
index 0a76402f555a8d7a523c91f62c1a85e10062a5a7..fadd972c1c9af88df081abbb2a308bccabee78e9 100644 (file)
@@ -1,5 +1,5 @@
 /* Java(TM) language-specific utility routines.
-   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
+   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
    Free Software Foundation, Inc.
 
 This file is part of GNU CC.
@@ -68,6 +68,8 @@ static tree java_tree_inlining_walk_subtrees  PARAMS ((tree *,
                                                       void *,
                                                       void *));
 static int java_unsafe_for_reeval PARAMS ((tree));
+static bool java_can_use_bit_fields_p PARAMS ((void));
+
 
 #ifndef TARGET_OBJECT_SUFFIX
 # define TARGET_OBJECT_SUFFIX ".o"
@@ -259,6 +261,8 @@ struct language_function GTY(())
 #define LANG_HOOKS_DECL_PRINTABLE_NAME lang_printable_name
 #undef LANG_HOOKS_PRINT_ERROR_FUNCTION
 #define LANG_HOOKS_PRINT_ERROR_FUNCTION        java_print_error_function
+#undef LANG_HOOKS_CAN_USE_BIT_FIELDS_P
+#define LANG_HOOKS_CAN_USE_BIT_FIELDS_P java_can_use_bit_fields_p
 
 #undef LANG_HOOKS_TYPE_FOR_MODE
 #define LANG_HOOKS_TYPE_FOR_MODE java_type_for_mode
@@ -794,6 +798,14 @@ java_init_options ()
   flag_trapping_math = 0;
 }
 
+static bool
+java_can_use_bit_fields_p ()
+{
+  /* The bit-field optimizations cause problems when generating class
+     files.  */
+  return flag_emit_class_files ? false : true;
+}
+
 /* Post-switch processing.  */
 static bool
 java_post_options ()