[cfe-dev] Disable #error?

Jacob Carlborg doob at me.com
Wed Jan 15 11:38:46 PST 2014

On 2014-01-15 18:39, Sean Silva wrote:

> You are trying to understand the meaning of the program, which means
> that you are under the same correctness constraints as when compiling.

I want the tool to understand enough to do the translation.

> Consider:
> #if defined(FOO)
> #error "bar"
> void
> #else
> int
> #endif
> some_function(int arg);
> If you ignore the #error, you will misunderstand the program's semantics.

I do understand what you're saying but I don't see any other way. The 
feature would probably be off by default with a flag to enable it. The 
user is free to use it if he/she wants to.

/Jacob Carlborg

More information about the cfe-dev mailing list