Hasani Hunter
Home
Archives
RSS Feed
@hasanihunter
© 2025 Hasani Hunter
November, 1 2010

Any LLVM devs understand why this breaks?

The following code breaks in XCode with both GCC and LLVM

Pulled from my Constants.h:

#define FULL_SERVER_DOMAIN(host) [ NSString stringWithFormat:@”%@.somedomain.com”, [ host lowercaseString ] ]

#define API_URL(domain,api)[ NSString stringWithFormat:@“https://%@/%@”,FULL_SERVER_DOMAIN(domain),api ]

#define URL_BY_ID(domain,room_id) API_URL(domain,[ NSString stringWithFormat:@“%d.xml”,room_id ] )

For some reason gcc thinks I am providing 3 args to the API_URL macro ( maybe counting commas?

LLVM just prints an error: Too many arguments provided to function-like macro invocation


https://hasani.me/F