-c names its output a.out, and -m output is not Sex #71

Open
opened 2026-10-19 14:09:44 +02:00 by alex-eg · 0 comments
Owner
  • sexc x.sex -c writes a.out, where cc -c x.c writes x.o: the default output name is the executable's, whatever is being built.

  • -m output is not Sex that reads back as the same program:

    • it begins with the prelude: (include inttypes.h), the u8, i8, ... typedefs;
    • a typedef comes out with its arguments in C's order, so (typedef byte u8) prints as (typedef u8 byte), which read back defines u8 as byte.

Found with sexc 35604ad, probing corner cases the test suite does not cover; the rest of what that turned up is fixed on more-tests-and-corner-cases.

- `sexc x.sex -c` writes `a.out`, where `cc -c x.c` writes `x.o`: the default output name is the executable's, whatever is being built. - `-m` output is not Sex that reads back as the same program: - it begins with the prelude: `(include inttypes.h)`, the `u8`, `i8`, ... typedefs; - a typedef comes out with its arguments in C's order, so `(typedef byte u8)` prints as `(typedef u8 byte)`, which read back defines `u8` as `byte`. -------- Found with sexc 35604ad, probing corner cases the test suite does not cover; the rest of what that turned up is fixed on `more-tests-and-corner-cases`.
alex-eg added the bug label 2026-10-19 14:09:44 +02:00
Sign in to join this conversation.