This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug objc/39753] [4.3/4.4/4.5 Regression] Objective-C(++) and C90 strict-aliasing interaction bug
- From: "john dot engelhart at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Apr 2009 01:15:45 -0000
- Subject: [Bug objc/39753] [4.3/4.4/4.5 Regression] Objective-C(++) and C90 strict-aliasing interaction bug
- References: <bug-39753-17566@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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