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

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

Comments

Projects
None yet
2 participants
@jacob-carlborg
Owner

jacob-carlborg commented Jul 9, 2012

No description provided.

@ciechowoj

This comment has been minimized.

Show comment
Hide comment
@ciechowoj

ciechowoj May 28, 2016

Contributor

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

Contributor

ciechowoj commented May 28, 2016

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

@jacob-carlborg

This comment has been minimized.

Show comment
Hide comment
@jacob-carlborg

jacob-carlborg May 29, 2016

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.

Owner

jacob-carlborg commented May 29, 2016

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

This comment has been minimized.

Show comment
Hide comment
@ciechowoj

ciechowoj May 30, 2016

Contributor

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.

Contributor

ciechowoj commented May 30, 2016

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

This comment has been minimized.

Show comment
Hide comment
@jacob-carlborg

jacob-carlborg May 31, 2016

Owner

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

Owner

jacob-carlborg commented May 31, 2016

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