dstep icon indicating copy to clipboard operation
dstep copied to clipboard

Option for turning off preprocessor errors (#error)

Open jacob-carlborg opened this issue 11 years ago • 4 comments

jacob-carlborg avatar Jul 09 '12 19:07 jacob-carlborg

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

ciechowoj avatar May 28 '16 18:05 ciechowoj

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.

jacob-carlborg avatar May 29 '16 12:05 jacob-carlborg

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.

ciechowoj avatar May 30 '16 22:05 ciechowoj

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

jacob-carlborg avatar May 31 '16 17:05 jacob-carlborg