From 09498bb7aab9182ba172aae1045ca895d4f422d4 Mon Sep 17 00:00:00 2001 From: _ov4 Date: Sat, 17 Oct 2026 15:13:04 +0000 Subject: docs: document EXTERN and INCLUDE_OBJ Co-Authored-By: Claude Opus 5.5 --- AGENTS/PITFALLS.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'AGENTS/PITFALLS.md') diff --git a/AGENTS/PITFALLS.md b/AGENTS/PITFALLS.md index 8f35c3d..551a64c 100644 --- a/AGENTS/PITFALLS.md +++ b/AGENTS/PITFALLS.md @@ -145,7 +145,13 @@ test programs. require casts even for literals. C scalar arithmetic uses native promotions, but / always returns REAL. Cast aliases must precede their use. long double may have padding; sizeof does not identify its floating-point format. Native - C support is verified on Linux LLVM 23; cross-target and EXTERN are unsupported. + C support is verified on Linux LLVM 23; cross-target is unsupported. +- **EXTERN "C" extension.** Top-level, body-less; parameters/results are C types only, + no BYREF/OVERLOAD/structs. Variadic arguments must be C values (default promotions). + The driver checks every EXTERN symbol against INCLUDE_OBJ inputs before CodeGen; + `"__libc"` must be included explicitly even though the runtime always links libc. + Only `.o` user objects; INCLUDE_OBJ is global across inputs. `-S` does not link them. + Two EXTERNs differing only in case conflict (pseudocode names are case insensitive). ## Not implemented (9618 features) -- cgit v1.3.1-4-g156e