This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug objc/39753] [4.3/4.4/4.5 Regression] Objective-C(++) and C90 strict-aliasing interaction bug



------- Comment #4 from john dot engelhart at gmail dot com  2009-04-14 01:15 -------
Another point to consider is whether or not C99's 'restrict' is a legitimate
type qualifier for pointers to Objective-C objects.  This is really more of an
observation that pragmatically, very little can be said about which object a
particular objc object pointer points to at any point in time.  This is beyond
the normal 'points to' ambiguity one deals with in C code due to the very
dynamic nature of Objective-C. IMHO, a programmer would have an extremely
difficult time keeping the promise that 'restrict' implies, even if one wanted
to.

I would guess that the 'safest' way of dealing with restrict qualified pointers
to objc objects would be to silently drop the restrict qualifier internally,
just make it a no-op.

The same could also be said of 'const'.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39753


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