For instance, given the following source file:
#ifdef HELLO_H
#include HELLO_H
#endif
int main(void)
{
return 0;
}
And an empty hello.h, running pcc -DHELLO_H=\"hello.h\" hello.c results in:
hello.h:8: error: unterminated conditional
error: /usr/local/libexec/cpp terminated with status 1
In the first run of fastscan() on hello.h, the first call to qcchar() resets to inp to linp, which at that point is set to the line in the original source file after #include HELLO_H, so it ends up processing the #endif in the context of hello.h and bombing out. I apologize that I don't have a fix for this, but hopefully this information helps.
For instance, given the following source file:
And an empty hello.h, running
pcc -DHELLO_H=\"hello.h\" hello.cresults in:In the first run of fastscan() on hello.h, the first call to qcchar() resets to
inptolinp, which at that point is set to the line in the original source file after#include HELLO_H, so it ends up processing the#endifin the context of hello.h and bombing out. I apologize that I don't have a fix for this, but hopefully this information helps.