-
-
Notifications
You must be signed in to change notification settings - Fork 54
tinyscheme fails to compile with GCC 15 / C23: isascii undeclared #370
Copy link
Copy link
Closed
Description
Problem
Building gerbv with GCC 15 on Linux fails with:
thirdparty/tinyscheme/scheme.c: In function 'Cisalpha':
thirdparty/tinyscheme/scheme.c:269:44: error: implicit declaration of function 'isascii' [-Wimplicit-function-declaration]
269 | static INLINE int Cisalpha(int c) { return isascii(c) && isalpha(c); }
| ^~~~~~~
isascii is a POSIX function, not part of the C standard. The project sets CMAKE_C_STANDARD 23 with CMAKE_C_EXTENSIONS OFF, so GCC compiles with -std=c23 which doesn't expose POSIX extensions. In C23, implicit function declarations are a hard error.
Root cause
The compilation-flags INTERFACE target defines _GNU_SOURCE on Linux (which exposes isascii from <ctype.h>), but tinyscheme_bundled links only config — it never gets _GNU_SOURCE.
Fix
Define _GNU_SOURCE on the tinyscheme_bundled target for Linux, matching the existing pattern in compilation-flags.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels