discuss-gnustep
[Top][All Lists]
Advanced

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

Re: make check - No subscripting support in the compiler


From: David Chisnall
Subject: Re: make check - No subscripting support in the compiler
Date: Fri, 3 Aug 2012 11:28:21 +0100

Hi Jim,

Array subscripting is only enabled with the non-fragile ABI, and so if you are 
using the legacy ABI then it won't work.  The reason for this is that it is 
spectacularly stupid syntax that overloads some pointer arithmetic.  This 
pointer arithmetic is not allowed when using Objective-C with a non-fragile 
ABI.  For example, with the fragile ABI you can (in theory) do this:

SomeObject *objects = calloc(42, sizeof(SomeObject));
for (int i=0 ; i<42 ; i++)
{
        [&objects[i] init];
}

With the non-fragile ABI, this would not be allowed because the size of 
SomeObject is not known at compile time and therefore neither the allocation 
nor the array indexing would work.

David

On 3 Aug 2012, at 10:54, Jim wrote:

> I just built llvm and clang from svn and did 'make check'
> just got the subscripting support error. Is there anything I can
> do to make sure objc_dictionary_literals objc_array_literals 
> are enabled in my svn build.
> 
> base/NSArray/basic.m:
> Skipped set:       basic.m 45 ... No collection subscripting support in the 
> compiler.
> --- Running tests in base/NSAttributedString ---
> --- Running tests in base/NSAutoreleasePool ---
> --- Running tests in base/NSBundle ---
> --- Running tests in base/NSCalendar ---
> --- Running tests in base/NSCalendarDate ---
> --- Running tests in base/NSCharacterSet ---
> --- Running tests in base/NSConnection ---
> --- Running tests in base/NSCountedSet ---
> --- Running tests in base/NSData ---
> --- Running tests in base/NSDate ---
> --- Running tests in base/NSDateFormatter ---
> --- Running tests in base/NSDictionary ---
> 
> base/NSDictionary/basic.m:
> Skipped set:       basic.m 40 ... No dictionary subscripting support in the 
> compiler.
> --- Running tests in base/NSException ---
> --- Running tests in base/NSFileHandle ---
> --- Running tests in base/NSFileManager ---
> 
> 
> # clang --version
> clang version 3.2 (trunk 161099)
> Target: i386-pc-linux-gnu
> Thread model: posix
> _______________________________________________
> Discuss-gnustep mailing list
> Discuss-gnustep@gnu.org
> https://lists.gnu.org/mailman/listinfo/discuss-gnustep


-- Sent from my brain




reply via email to

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