[cfe-dev] Disable #error?

Jacob Carlborg doob at me.com
Tue Jan 14 11:37:36 PST 2014


On 2014-01-14 18:58, Alp Toker wrote:

> This is an interesting idea. It's always a hard error right now.
>
> We've seen similar requests to 'downgrade' a few other errors like the
> MS inline assembly missing-backend one and I suspect there's a pattern
> developing here.
>
> Could you expand on your specific use-case a little?

I have a tool that translate C header files to D modules[1]. The tool is 
designed to translate header files one at the time. The problem is that 
in some C libraries some kind of umbrella headers are used. They only 
serve to include other sub header files. Some of these libraries enforce 
this by the sub header files checking for a preprocessor macro defined 
by the umbrella header. If this macro is not defined they halt the 
complication with the #error directive.

I'm using libclang since the tool itself is written in D. D is ABI 
compatible with C.

[1] https://github.com/jacob-carlborg/dstep

-- 
/Jacob Carlborg




More information about the cfe-dev mailing list