[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: applications that fail to build with new gnustep from svn
From: |
David Chisnall |
Subject: |
Re: applications that fail to build with new gnustep from svn |
Date: |
Wed, 6 Apr 2011 10:35:26 +0100 |
On 6 Apr 2011, at 10:25, Riccardo Mottola wrote:
>> If that code works for you, you really should update your compiler :-)
> Well, I get no warning at all ranging from gcc 2.95 to gcc 4.5.2...
I suspect this is because gcc doesn't really understand Objective-C types, it
just follows the StepStone approach of mapping classes to structures and adding
a few extra checks. Unless you happen to hit one of the specific cases where
someone on the GCC team thought about checking, then they're just treated as C
types. In this case, I think it will be passing each value through as a
structure, so trying to write a complete copy of the object out onto the stack.
This will, of course, break horribly in the presence of subclassing, which is
why the language disallows it.
I'm a bit surprised though, as this ought to be caught by the code that handles
dereferencing pointers (which should check if it's an Objective-C type, and
reject it if it is).
In clang, the Objective-C types are represented in the type system in the AST,
right up to code generation. This means that any part of the code generation
knows if it's dealing with Objective-C objects or pointers to C structures (or
C++ classes).
David
-- Sent from my IBM 1620
- Re: applications that fail to build with new gnustep from svn, (continued)
- Re: applications that fail to build with new gnustep from svn, Sebastian Reitenbach, 2011/04/05
- Re: applications that fail to build with new gnustep from svn, Wolfgang Lux, 2011/04/05
- Re: applications that fail to build with new gnustep from svn, Riccardo Mottola, 2011/04/05
- Re: applications that fail to build with new gnustep from svn, Fred Kiefer, 2011/04/05
- Re: applications that fail to build with new gnustep from svn, Nicola Pero, 2011/04/08
- Re: applications that fail to build with new gnustep from svn, Sebastian Reitenbach, 2011/04/08
Re: applications that fail to build with new gnustep from svn, Fred Kiefer, 2011/04/05
Re: applications that fail to build with new gnustep from svn, Sebastian Reitenbach, 2011/04/06