This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
patch: Print method name in Java error messages
- To: gcc-patches at gcc dot gnu dot org, java-discuss at sources dot redhat dot com
- Subject: patch: Print method name in Java error messages
- From: Per Bothner <per at bothner dot com>
- Date: 21 Jan 2001 12:48:02 -0800
I noticed that when an error message prints out a method,
it print's the method's class and argument list - but not
the actual method name! I propose the following fix
(which I am checking in).
2001-01-21 Per Bothner <per@bothner.com>
* lang.c (put_decl_node): Print method's name.
Index: lang.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/java/lang.c,v
retrieving revision 1.58
diff -u -p -r1.58 lang.c
--- lang.c 2001/01/18 03:07:01 1.58
+++ lang.c 2001/01/21 19:12:19
@@ -500,8 +500,11 @@ put_decl_node (node)
if (TREE_CODE (node) == FUNCTION_DECL
&& ! DECL_CONSTRUCTOR_P (node)
&& ! DECL_ARTIFICIAL (node) && DECL_CONTEXT (node))
- put_decl_node (TYPE_NAME (DECL_CONTEXT (node)));
- else if (! DECL_CONSTRUCTOR_P (node))
+ {
+ put_decl_node (TYPE_NAME (DECL_CONTEXT (node)));
+ put_decl_string (".", 1);
+ }
+ if (! DECL_CONSTRUCTOR_P (node))
put_decl_node (DECL_NAME (node));
if (TREE_CODE (node) == FUNCTION_DECL && TREE_TYPE (node) != NULL_TREE)
{
--
--Per Bothner
per@bothner.com http://www.bothner.com/~per/