a nifty feature for c preprocessor
Robert Dewar
dewar@adacore.com
Thu Dec 29 10:46:00 GMT 2011
On 12/28/2011 6:25 PM, R A wrote:
>
> that all being said, i really don't think it's a hard feature to
> implement.... like i said, just whenever there is an 1) evaluation in
> the conditional directives or 2) #define is called, look for "eval",
> if there, evaluate the expression, then substitute token.
It will definitely be harder than you think. Lots of changes like
this are easy enough when described at a high level of abstraction,
but the implementation details are complex.
And I agree with others, this is an undesirable extension to the
language regardless of difficulty of implementation.
> it'll just take me a long time to know how to work with setting all
> the flags, attributes, and working with the structs, so it's hard for
> me to do by myself.
I discourage the effort, I don't think the result, even if you do
achieve a working version, would ever be accepted. Better to spend
your effort figuring out more appropriate ways to solve the problem.
More information about the Gcc
mailing list