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
[email protected]
http://lists.gnu.org/mailman/listinfo/gnustep-dev
_______________________________________________
Gnustep-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnustep-dev