PBXB64 supports a controlled C17 subset interoperable with B64/PB/PILOT through the unified IR. V8 adds full preprocessor, runtime control flow, and 26 standard headers. V9 hardens preprocessor corner cases, adds function pointers, and strengthens runtime aliases.
Preprocessor (V8/V9 Full Support)
V8/V9 adds complete C preprocessor support
#define MAX 100
#define ADD(a,b) ((a)+(b))
#if MAX > 50
int x = 1;
#elif defined(DEBUG)
int x = 2;
#else
int x = 3;
#endif
#ifdef __STDC__
int ver = __STDC_VERSION__; // 201710L
#endif
// Stringification and token paste
#define STR(x) #x
#define CAT(a,b) a##b
| Directive | V8/V9 Support |
|---|---|
#define / #undef | Object-like and function-like macros |
#if / #ifdef / #ifndef | Full expression evaluation (+ - * / % << >> & ^ |) |
#elif / #else / #endif | Nested conditionals |
#include | Local and system headers |
#error | Diagnostic messages |
# / ## | Stringification and token paste |
| Variadic macros | __VA_ARGS__ |
_Pragma / #pragma | Accepted/ignored, stripped during expansion (V9) |
#line | Compatibility directive accepted (V9) |
__FILE__ / __LINE__ | Predefined string/integer macros (V9) |
C17 Standard Headers (V8/V9)
26 C17 headers available at core/include/c17/. Include with -I flag:
PBXB64 -I core/include/c17 program.c -o program.exe
stdio.h | stdlib.h | string.h | stdint.h |
stddef.h | stdbool.h | stdalign.h | stdarg.h |
limits.h | float.h | math.h | ctype.h |
assert.h | errno.h | time.h | inttypes.h |
fenv.h | iso646.h | locale.h | setjmp.h |
signal.h | stdatomic.h | stdnoreturn.h | threads.h |
tgmath.h | wchar.h | wctype.h | uchar.h |
V9 Runtime & Function Pointers
V9 adds native runtime aliases and simple function-pointer calls:
// Simple direct function pointer call (V9)
long long add(long long a, long long b) { return a + b; }
int main(void) {
long long (*fp)(long long, long long) = &add;
return (int)fp(20, 22);
}
// Runtime aliases (V9)
void* p = malloc(100); // Maps to KERNEL32 HeapAlloc
free(p); // Maps to KERNEL32 HeapFree
size_t len = strlen(s); // Native bestof implementation
Control Flow (V8)
// switch/case with fallthrough
switch (x) {
case 1: do_something(); break;
case 2:
case 3: do_other(); // intentional fallthrough
break;
default: break;
}
// goto/labels
if (x) goto label;
label: return 0;
// ternary operator
return (x > 0) ? 1 : -1;
// multi-increment for loop
for (int i = 0; i < 10; i++, j += 2) {
body
}
Language Features (V8/V9)
| Feature | Status |
|---|---|
_Static_assert | Integer constant expressions |
_Alignof | Bootstrap handling |
sizeof | Type and expression forms |
union | Parsing and layout (V9 shell) |
| Function pointer typedefs | Declarations, address-of, direct calls (V9) |
| Bitfield-bearing structs | Bodies parsed/skipped safely (V9) |
| Octal integer constants | Supported |
| Adjacent string literals | Covered cases |
| Backslash-newline splicing | Preprocessor phase |
Known C17 Gaps: Not full hosted C17. No windows.h, no complete floating-point guarantee, no varargs ABI/runtime (planned V11), no indirect function-pointer calls beyond local direct targets, no complex/atomics/threads/fenv depth.