boot2

Playing with the boostrap
git clone https://git.ryansepassi.com/git/boot2.git
Log | Files | Refs | README

commit c7dc4371042d8047389026a9448de6e156472fda
parent f74b661983e00077b5d14372559c3d293c225c97
Author: Ryan Sepassi <rsepassi@gmail.com>
Date:   Fri,  1 May 2026 18:49:19 -0700

tests/cc-pp: pin #if short-circuit and /0 diagnostic

Diffstat:
Atests/cc-pp/50-pp-divzero.c | 5+++++
Atests/cc-pp/50-pp-divzero.expected-exit | 1+
Atests/cc-pp/51-pp-shortcircuit-lor.c | 3+++
Atests/cc-pp/51-pp-shortcircuit-lor.expected-toks | 2++
Atests/cc-pp/52-pp-shortcircuit-land.c | 5+++++
Atests/cc-pp/52-pp-shortcircuit-land.expected-toks | 2++
Atests/cc-pp/53-pp-shortcircuit-cond.c | 3+++
Atests/cc-pp/53-pp-shortcircuit-cond.expected-toks | 2++
8 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/tests/cc-pp/50-pp-divzero.c b/tests/cc-pp/50-pp-divzero.c @@ -0,0 +1,5 @@ +#if 1/0 +1 +#else +2 +#endif diff --git a/tests/cc-pp/50-pp-divzero.expected-exit b/tests/cc-pp/50-pp-divzero.expected-exit @@ -0,0 +1 @@ +1 diff --git a/tests/cc-pp/51-pp-shortcircuit-lor.c b/tests/cc-pp/51-pp-shortcircuit-lor.c @@ -0,0 +1,3 @@ +#if 1 || (1/0) +77 +#endif diff --git a/tests/cc-pp/51-pp-shortcircuit-lor.expected-toks b/tests/cc-pp/51-pp-shortcircuit-lor.expected-toks @@ -0,0 +1,2 @@ +(INT 77 "51-pp-shortcircuit-lor.c" 2 1) +(EOF #f "51-pp-shortcircuit-lor.c" 4 1) diff --git a/tests/cc-pp/52-pp-shortcircuit-land.c b/tests/cc-pp/52-pp-shortcircuit-land.c @@ -0,0 +1,5 @@ +#if 0 && (1/0) +1 +#else +77 +#endif diff --git a/tests/cc-pp/52-pp-shortcircuit-land.expected-toks b/tests/cc-pp/52-pp-shortcircuit-land.expected-toks @@ -0,0 +1,2 @@ +(INT 77 "52-pp-shortcircuit-land.c" 4 1) +(EOF #f "52-pp-shortcircuit-land.c" 6 1) diff --git a/tests/cc-pp/53-pp-shortcircuit-cond.c b/tests/cc-pp/53-pp-shortcircuit-cond.c @@ -0,0 +1,3 @@ +#if 1 ? 77 : (1/0) +77 +#endif diff --git a/tests/cc-pp/53-pp-shortcircuit-cond.expected-toks b/tests/cc-pp/53-pp-shortcircuit-cond.expected-toks @@ -0,0 +1,2 @@ +(INT 77 "53-pp-shortcircuit-cond.c" 2 1) +(EOF #f "53-pp-shortcircuit-cond.c" 4 1)