scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

commit d6e853477e7e2ac5c96765369d6482822510e459
parent eafa054ecd27bc9e19f9d6424bc28a11345e57c6
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Thu,  2 Feb 2023 13:53:35 +0100

cc1: Stop after #error

Gcc and Clang continue executing after a #error but pcc and
tcc don't. As #error is very useful to debug I think it makes
sense to stop.

Diffstat:
Msrc/cmd/cc/cc1/cpp.c | 1+
1 file changed, 1 insertion(+), 0 deletions(-)

diff --git a/src/cmd/cc/cc1/cpp.c b/src/cmd/cc/cc1/cpp.c @@ -729,6 +729,7 @@ usererr(void) if (cppoff) return; cpperror("#error %s", input->p); + exit(EXIT_FAILURE); next(); }