R A <ren_zokuke...@hotmail.com> writes: >> This particular extension seems problematic when cross-compiling. In >> what environment should the expressions be evaluated? > > > why > are you asking for a specific environment? it's coding convenience and > elegance for coding in c itself. simplest case scenario is what i've > already mentioned in my very first email.
You are proposing a scheme in which the preprocessor can evaluate expressions and convert them back to strings. What are the types of the numbers in the expressions? What happens when they overflow? If the expressions use floating point values, are the floating point values in the host format or the target format? When converting a floating point value back to a string, what technique is used? Do we want to ensure that all preprocessors will get the same result? Or do we want to use values appropriate for the host? Or do we want to use values appropriate for the target? We can invent answers for these questions but I don't see any obvious answers. Some of the answers would impose significant amounts of extra implementation work for any C compiler. Hence, the extension is problematic. Ian