On 31 Dec 2010, at 15: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.
Hmm, that's a bit odd. I tested it with clang, but I read the GCC docs to find out whether it works. Does anyone know if it works in GCC 4.6, otherwise I can just wrap it in #ifdef __clang__? David -- Sent from my IBM 1620 _______________________________________________ Gnustep-dev mailing list Gnustep-dev@gnu.org http://lists.gnu.org/mailman/listinfo/gnustep-dev