This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug preprocessor/28375] New: Macro expansion breaks with Objective-C var-arg method calls
- From: "mike at ambrosiasw dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Jul 2006 22:23:31 -0000
- Subject: [Bug preprocessor/28375] New: Macro expansion breaks with Objective-C var-arg method calls
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
If an Objective-C call with variable arguments, such as [NSString
stringWithFormat:@"foo %d", 3], is wrapped in a macro call, the combined call
will fail to compile. It seems like gcc is overlooking the square brackets
entirely, and sees the comma in the method call as belonging to the macro
itself.
See attached test case, let me know if this should be reported to Apple
instead/as well. This is using the gcc version they shipped with Xcode 2.3.
--
Summary: Macro expansion breaks with Objective-C var-arg method
calls
Product: gcc
Version: 4.0.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: preprocessor
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: mike at ambrosiasw dot com
GCC build triplet: powerpc-apple-darwin8
GCC host triplet: i686-apple-darwin8
GCC target triplet: i686-apple-darwin8
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28375