This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]