Is there a way to make GCC's preprocessor stop when it finds a #error, when running it with option -E
?
For instance, in the following program:
#error STOP HERE int main() { return 0; }
Running gcc
on this program results in an interrupted compilation at line 1, but running gcc -E
outputs the same line, and then continues with preprocessing.
Note: my question is similar to GCC #pragma to stop compilation, but concerning the -E
flag, so maybe both should be merged?