[Bug preprocessor/28375] New: Macro expansion breaks with Objective-C var-arg method calls

mike at ambrosiasw dot com gcc-bugzilla@gcc.gnu.org
Thu Jul 13 22:23:00 GMT 2006


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



More information about the Gcc-bugs mailing list