This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]