On Thu, 12 Apr 2001, Frank Heckenbach wrote:
Russ Whitaker wrote:
gpc-20010409 didn't work because #define won't make changes inside a quoted string.
Nope. The CPP macro is always used outside of the quoted strings (even where it doesn't appear so, e.g. in line 804, but note the opening quote in 803). (What results from preprocessor expansion is a sequence of strings like "%{E:" "cpp0" " -lang-c ..." which the C compiler concatenates to a string constant. In Pascal we'd write '%{E:' + CPP + ' -lang-c ...', but apart from syntax, it's the same.)
The reason it didn't work, as Andris pointed out, was because the #define was before the #includes, rather then after them. I'll fix this in my next change.
Not true.
My first approach was:
Since CPP is in use elsewhere, renamed cpp to czz in the table. then added:
#ifdef GPC_2_95_3 #define czz cpp0 #else #define czz cpp #endif
Compiled ok, but the test suite bombed out with czz. Obviously, define should have replaced czz with either cpp0 or cpp but did neither.
Russ