gnustep-dev
[Top][All Lists]
Advanced

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

Re: [Gnustep-cvs] r31804 - /libs/base/trunk/Headers/Foundation/NSBundle.


From: Nicola Pero
Subject: Re: [Gnustep-cvs] r31804 - /libs/base/trunk/Headers/Foundation/NSBundle.h
Date: Fri, 31 Dec 2010 19:38:19 +0100

Support for attributes of Objective-C methods was added in GCC 4.6.0 (not released yet). Older GCCs do not recognize them and will throw a parse error whenever they encounter them. :-(

So, it's not just a matter of that specific attribute not being recognized (that would normally generate a warning which you can turn off with a command-line flag); it's *all* attributes that don't work with GCC 4.5.0, as the parser
doesn't recognize them at all.

Thanks

On 31 Dec 2010, at 16:52, Fred Kiefer wrote:

Am 31.12.2010 15:03, schrieb David Chisnall:
Author: theraven
Date: Fri Dec 31 15:03:45 2010
New Revision: 31804

URL: http://svn.gna.org/viewcvs/gnustep?rev=31804&view=rev
Log:
Add __attribute__ ((format_arg)) to [NSBundle - localizedStringForKey:value:table:]. This informs the compiler that the output can be used anywhere that the first argument can be used, and should silence all of the non-constant format string warnings that we get anywhere that _(@"foo") or similar is used.


Modified:
   libs/base/trunk/Headers/Foundation/NSBundle.h

This change breaks compilation of base for me:

In file included from GSXML.m:57:0:
../../Headers/Foundation/NSBundle.h:307:38: error: expected ‘;’ before
‘__attribute__’
make[4]: *** [obj/Additions.obj/GSXML.m.o] Fehler 1
make[4]: *** Warte auf noch nicht beendete Prozesse...
make[3]: *** [internal-subproject-all_] Fehler 2
make[2]: *** [Additions.all.subproject.variables] Fehler 2
make[1]: *** [internal-all] Fehler 2
make: *** [internal-all] Fehler 2

I am using gcc version 4.5.0 and I am not sure whether there is just
another compiler flag missing or whether this attribute isn't supported
for Objective-C.

_______________________________________________
Gnustep-dev mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/gnustep-dev




reply via email to

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