|
From: Michael T. <li...@mj...> - 2003-06-26 04:00:14
|
Hi,
Is there some kind of hidden setting in the project file to turn off
newer compiler features? I started adding the variadic macro stuff, but
it isn't letting me use the new feature where ,## lets you have zero
arguments for the format string. So this:
log4Debug(@"Set Log Level to Debug for Log message test.");
is telling me that I'm missing an argument, with log4Debug defined as:
#define log4Debug(message, args...) // etc.
It doesn't like other newer GCC features like the ?: operator, which I
used in this code from L4SimpleLayout that I was speeding up:
- (NSString *) format: (L4LoggingEvent *) anEvent
{
return [NSString stringWithFormat:@"%@ - %ld %@:%@) %@ - %@",
[[anEvent level] stringValue],
[anEvent millisSinceStart],
// [anEvent fileName] ?: @"",
[anEvent fileName] ? [anEvent fileName] : @"",
// [[anEvent lineNumber] stringValue] ?: @"",
[anEvent lineNumber] ? [[anEvent lineNumber] stringValue]: @"",
// [anEvent methodName] ?: @"";
[anEvent methodName] ? [anEvent methodName] : @"",
[anEvent renderedMessage]];
}
When I added the same files to one of my other projects, they compiled
fine. As far as I can tell, the settings in Project Builder that would
matter are the same, but I must be missing something.
--Michael
|