This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Wrong comment/diagnostic in parse.y
- From: Ranjit Mathew <rmathew at gmail dot com>
- To: java at gcc dot gnu dot org
- Date: Tue, 15 Jun 2004 13:31:40 +0530
- Subject: Wrong comment/diagnostic in parse.y
Hi,
This should qualify as "obvious", but I just needed
to confirm and get an explicit approval - the comment
in line 4010 and the diagnostic in line 4013 in parse.y
(method create_class()) is wrong - the actual error is
that the user is trying to make java.lang.Object extend
something else:
----------------------------- 8< -----------------------------
4007 /* If SUPER exists, use it, otherwise use Object */
4008 if (super)
4009 {
4010 /* Can't extend java.lang.Object */
4011 if (TREE_TYPE (IDENTIFIER_CLASS_VALUE (class_id)) == object_type_n
ode)
4012 {
4013 parse_error_context (id, "Can't extend `java.lang.Object'");
4014 return NULL_TREE;
4015 }
4016
4017 super_decl_type =
4018 register_incomplete_type (JDEP_SUPER, super, decl, NULL_TREE);
4019 }
----------------------------- 8< -----------------------------
Shall I change it to "`java.lang.Object' can't extend anything"?
(ISTR that we decided to not use "inverted single quotes" for
such messages...or did we?)
Thanks,
Ranjit.
--
Ranjit Mathew Email: rmathew AT gmail DOT com
Bangalore, INDIA. Web: http://ranjitmathew.tripod.com/