diff --git a/src/c/day1.c b/src/c/day1.c index cc9d7d5..16947c9 100644 --- a/src/c/day1.c +++ b/src/c/day1.c @@ -3,10 +3,15 @@ * * Grendel: a compiling Beowulf reimplementation. * - * Day 1 of work towards a compiler... eventually.. + * Day 1 of work towards a compiler... eventually... * * This is a straight copy of Noah Zentzis' work. There's no original work of - * mine here, yet + * mine here, yet. + * + * See: https://generalproblem.net/lets_build_a_compiler/01-starting-out/ + * + * I needed to install (on Debian) the package `gcc-multilib` to get this to + * link. * * (c) 2026 Simon Brooke * Licensed under GPL version 2.0, or, at your option, any later version. @@ -16,6 +21,12 @@ #include #include +/* + * "The `__attribute__((__cdecl__))` part is a GCC-specific syntax extension + * that tells the compiler to use the + * "[cdecl](https://en.wikipedia.org/wiki/X86_calling_conventions#cdecl)" + * calling convention when executing the function." + */ __attribute__((__cdecl__)) extern int lisp_entry();