This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
format argument does not have string type
- From: Jack Howarth <howarth at bromo dot med dot uc dot edu>
- To: gcc at gcc dot gnu dot org
- Date: Thu, 30 Apr 2009 00:58:56 -0400
- Subject: format argument does not have string type
Does anyone understand why Apple's gcc-4.2 compiler in
Xcode 3.1.2 accepts the following code...
typedef const struct __CFString * CFStringRef;
typedef struct __CFBundle *CFBundleRef;
extern
CFStringRef CFBundleCopyLocalizedString(CFBundleRef bundle, CFStringRef key, CFStringRef value, CFStringRef tableName) __attribute__((format_arg(2)));
and FSF gcc 4.3 and 4.4 produces the error message...
gcc-4 testcase.c -F. -S -o test.s
testcase.c:5: error: format string argument not a string type
...instead? Is this a language violation that Apple ignores or
do they have more capabilities in their attributes than FSF gcc?
Thanks in advance for any clarification on whether this merits
an enhancement request for gcc 4.5.
Jack