gnustep-dev
[Top][All Lists]
Advanced

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

Re: [Gnustep-cvs] r32376 - in /libs/base/trunk/Source: GNUmakefile GSBlo


From: Fred Kiefer
Subject: Re: [Gnustep-cvs] r32376 - in /libs/base/trunk/Source: GNUmakefile GSBlocks.m
Date: Sat, 26 Feb 2011 15:33:51 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.1.16) Gecko/20101125 SUSE/3.0.11 Thunderbird/3.0.11

Hi David,

I am getting a lot of errors from gcc 4.5 with this change:

Compiling file GSBlocks.m ...
GSBlocks.m: In function ‘+[GSBlock load]’:
GSBlocks.m:25:2: error: ‘for’ loop initial declarations are only allowed
in C99 mode
GSBlocks.m:25:2: note: use option -std=c99 or -std=gnu99 to compile your
code
GSBlocks.m:30:2: warning: ISO C90 forbids mixed declarations and code
GSBlocks.m: In function ‘-[GSBlock copyWithZone:]’:
GSBlocks.m:35:2: warning: implicit declaration of function ‘Block_copy’
GSBlocks.m:35:2: warning: return makes pointer from integer without a cast
GSBlocks.m: In function ‘-[GSBlock copy]’:
GSBlocks.m:39:2: warning: return makes pointer from integer without a cast
GSBlocks.m: In function ‘-[GSBlock retain]’:
GSBlocks.m:43:2: warning: return makes pointer from integer without a cast
GSBlocks.m: In function ‘-[GSBlock release]’:
GSBlocks.m:47:2: warning: implicit declaration of function ‘Block_release’

Now most of this would be resolvable by sticking to old C conventions
and renaming the locally declared functions by removing the underscore.
But what would happen then? When linking this file the block functions
would still be missing. A clever linker wont complain about that, but
will this also work on Windows? And what is the whole point of adding
support for blocks into base, when the compiler and runtime don't
support them?
What we need here is a proper detection of block support in the
configure step. And while you are at it, would you mind to put in a
correct header for this file? (copyright, licence and what so ever)

Cheers
Fred

Am 26.02.2011 14:10, schrieb David Chisnall:
> Author: theraven
> Date: Sat Feb 26 14:10:49 2011
> New Revision: 32376
> 
> URL: http://svn.gna.org/viewcvs/gnustep?rev=32376&view=rev
> Log:
> Move method declarations on blocks from EtoileFoundation into GNUstep.  
> 
> 
> Added:
>     libs/base/trunk/Source/GSBlocks.m
> Modified:
>     libs/base/trunk/Source/GNUmakefile



reply via email to

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