[PATCH]: Cleanup patch from Joerg Brunsmann
Alexandre Petit-Bianco
apbianco@cygnus.com
Tue Feb 15 14:26:00 GMT 2000
I'm checking in this cleanup patch from Joerg Brunsmann.
./A
Mon Jan 18 14:30:09 2000 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
* gjavah.c: Delete ACC_VISIBILITY define.
* jcf.h: Add ACC_VISIBILITY define.
* parse.y: final: rule tagged <value>.
(java_check_regular_methods): Use ACC_VISIBILITY define for
default package access check.
(local_variable_declaration_statement): Use final: rule.
Index: gjavah.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/java/gjavah.c,v
retrieving revision 1.44
diff -u -p -r1.44 gjavah.c
--- gjavah.c 2000/02/15 16:36:34 1.44
+++ gjavah.c 2000/02/15 21:53:54
@@ -89,8 +89,6 @@ struct JCF *current_jcf;
If 0 then we haven't previously examined any field. */
static JCF_u2 last_access;
-#define ACC_VISIBILITY (ACC_PUBLIC | ACC_PRIVATE | ACC_PROTECTED)
-
/* Pass this macro the flags for a class and for a method. It will
return true if the method should be considered `final'. */
#define METHOD_IS_FINAL(Class, Method) \
Index: jcf.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/java/jcf.h,v
retrieving revision 1.14
diff -u -p -r1.14 jcf.h
--- jcf.h 2000/01/21 20:57:00 1.14
+++ jcf.h 2000/02/15 21:53:56
@@ -206,6 +206,8 @@ typedef struct JCF {
#define ACC_INTERFACE 0x0200
#define ACC_ABSTRACT 0x0400
+#define ACC_VISIBILITY (ACC_PUBLIC | ACC_PRIVATE | ACC_PROTECTED)
+
#define CONSTANT_Class 7
#define CONSTANT_Fieldref 9
#define CONSTANT_Methodref 10
Index: parse.y
===================================================================
RCS file: /cvs/gcc/egcs/gcc/java/parse.y,v
retrieving revision 1.134
diff -u -p -r1.134 parse.y
--- parse.y 2000/01/29 22:40:07 1.134
+++ parse.y 2000/02/15 21:56:34
@@ -414,7 +414,7 @@ static tree package_list = NULL_TREE;
%token STRING_LIT_TK CHAR_LIT_TK INT_LIT_TK FP_LIT_TK
%token TRUE_TK FALSE_TK BOOL_LIT_TK NULL_TK
-%type <value> modifiers MODIFIER_TK
+%type <value> modifiers MODIFIER_TK final
%type <node> super ID_TK identifier
%type <node> name simple_name qualified_name
@@ -1280,7 +1280,7 @@ local_variable_declaration_statement:
local_variable_declaration:
type variable_declarators
{ declare_local_variables (0, $1, $2); }
-| modifiers type variable_declarators /* Added, JDK1.1 final locals */
+| final type variable_declarators /* Added, JDK1.1 final locals */
{ declare_local_variables ($1, $2, $3); }
;
@@ -4896,7 +4896,7 @@ java_check_regular_methods (class_decl)
one that was found elsewhere. Do not issue this warning when
the match was found in java.lang.Object. */
if (DECL_CONTEXT (found) != object_type_node
- && ((aflags & 0x7) == 0)
+ && ((aflags & ACC_VISIBILITY) == 0)
&& !class_in_current_package (DECL_CONTEXT (found))
&& DECL_NAME (found) != clinit_identifier_node
&& flag_not_overriding)
More information about the Gcc-patches
mailing list