discuss-gnustep
[Top][All Lists]
Advanced

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

Re: problems with forward invocation (gcc bug?)


From: Helge Hess
Subject: Re: problems with forward invocation (gcc bug?)
Date: Wed, 01 Aug 2001 14:15:54 +0200

Wim Oudshoorn wrote:
> > a) there is only a single definition of cString - in this case the
> > return type is obvious and taken by the compiler
> But still, with x being `id', the selector is untyped, regardless
> if the compiler generates the correct calling sequence.

Ok. This is some kind of compiler 'bug' (the compiler isn't *required*
to generate typed selectors by language definition).
It isn't really a bug, since if the selector is untyped, you can always
retrieve the type using [x methodSignatureForSelector:...] in the
NSInvocation code. Carrying the type with the selector is only a speed
optimization.

I didn't fully follow the discussion, but I can't see problems so far.

> I do not have gcc here, but I think that
> 
> @selector (selectorThatIsNeverDefined);
> 
> does not result in a warning by gcc.

No, why should be that ? A selector is just a name in this case.

This would result in a warning:

  [x selectorThatIsNeverDefined]

since this requires the signature of the selector.

Again: typed selectors are a speed optimization of gcc, and are not
required for anything OpenStep related as far as I can see.

> Beside that, I think that untyped selectors are quite
> usefull, especially in the DO case, or in combination
> with NSSelectorFromString ().

Of course.

Greetings
  Helge
-- 
SKYRIX Software AG - http://www.skyrix.com
Web Application Technology for Enterprises



reply via email to

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