gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to check that selectors exist


From: Stan Shebs
Subject: Re: How to check that selectors exist
Date: Fri, 09 Aug 2002 11:01:00 -0700
User-agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US; rv:0.9.4.1) Gecko/20020508 Netscape6/6.2.3

Nicola Pero wrote:


Here is a set of patches implementing -Wundeclared-selector as promised.

NB: I will be leaving for two weeks on saturday (holidays finally :-). If Stan approves it when I'm away, I'm happy with anyone else applying it
(including any sort of reformatting and improvements which might be
necessary).  Else, I'll apply it if approved before I leave (which I
doubt, given how slow Stan is in approving :-), or when I am back.

Just for that :-), here's the OK.  (modulo a couple nits)

+/*
+ * This function is called by the parser when a @selector() expression
+ * is found, in order to compile it.  It is only called by the parser
+ * and only to compile a @selector().
+ */

The usual style is not to have leading '*' in comment blocks.


+ warning ("unknown (undeclared) selector `%s'", + IDENTIFIER_POINTER (selname));

I suggest phrasing this as just "undeclared selector `%s'".  The use of
both terms made me wonder if it were possible to have known but
undeclared selectors, or vice versa.

 (METHOD_SEL_NAME (mchain) == key)
-       return mchain;
+       {
+         return mchain;
+       }

Coding style sez not to do this change.

Also, you need to document it in doc/invoke.texi, otherwise the users
might never learn of this nice new warning's existence!

Stan





reply via email to

[Prev in Thread] Current Thread [Next in Thread]