Skip to content

Option for turning off preprocessor errors (#error) #3

Open
jacob-carlborg opened this Issue Jul 9, 2012 · 4 comments

2 participants

@jacob-carlborg
Owner

No description provided.

@ciechowoj

@jacob-carlborg do you have any specific examples (e.g C library) where #errors make a problem ?

@jacob-carlborg
Owner

I had a problem with some library, I can't remember which one, that used #error to verify that header files were included in the correct order, or had been included at all. Since DStep only operates on single files, not using the whole build system, some files were not included. The solution to that was to use the Clang -include to include the other header file before processing the current file.

Not sure if it's possible to do anyway.

@ciechowoj

Very desperate solution would be to copy all header files belonging to current translation (e.g. to /tmp), replace all #error, run the dstep on such modified files and do some patching of file names (e.g. in messages) so that it is transparent to the end-user.

@jacob-carlborg
Owner

I would put this issue pretty low on the priority list, until it actually causes problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.