parse.y (method_header): Don't set the DECL_NAME of a FUNCTION_DECL to a EXPR_WITH_FI...
authorPer Bothner <per@bothner.com>
Sun, 21 Jan 2001 20:18:31 +0000 (12:18 -0800)
committerPer Bothner <bothner@gcc.gnu.org>
Sun, 21 Jan 2001 20:18:31 +0000 (12:18 -0800)
* parse.y (method_header):  Don't set the DECL_NAME of a FUNCTION_DECL
to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.

From-SVN: r39169

gcc/java/ChangeLog
gcc/java/parse.y

index b1295c18e751b8cdf22893db2d3e479ab64b5817..11ad1a5150787e7d7269c7aeca384c0cc7d632c5 100644 (file)
@@ -1,3 +1,8 @@
+2001-01-21  Per Bothner  <per@bothner.com>
+
+       * parse.y (method_header):  Don't set the DECL_NAME of a FUNCTION_DECL
+       to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
+
 2001-01-19  Per Bothner  <per@bothner.com>
 
        * expr.c (pop_type_0):  Only return object_ptr_type_node on mismatch
index c5165b7f9338040b41df8fb927d0e3825223260b..73c0496e87790145979e0bf9f7a333113fe6691e 100644 (file)
@@ -4514,16 +4514,6 @@ method_header (flags, type, mdecl, throws)
       DECL_FUNCTION_THROWS (meth) = throws;
     }
 
-  /* We set the DECL_NAME to ID so we can track the location where
-     the function was declared. This allow us to report
-     redefinition error accurately. When method are verified,
-     DECL_NAME is reinstalled properly (using the content of the
-     WFL node ID) (see check_method_redefinition). We don't do that
-     when Object is being defined. Constructor <init> names will be
-     reinstalled the same way. */
-  if (TREE_TYPE (GET_CPC ()) != object_type_node)
-    DECL_NAME (meth) = id;
-
   /* Set the flag if we correctly processed a constructor */
   if (constructor_ok)
     {