Closed liujed closed 3 years ago
I agree that just -undef
is sufficient. I included -nostdinc
at @vgurevich's suggestion, but I don't think it's really necessary.
Oh, I should also mention that p4c's call to cpp
also includes -nostdinc
: https://github.com/p4lang/p4c/blob/80f8970b5ec8e57c4a3611da343461b5b0a8dda3/frontends/common/options.cpp#L292. I think the two really ought to be consistent.
This prevents inadvertent rewrites of tokens such as "linux" due to the system having an implicit
#define linux 1
.