ATLAS / C SUBSET

C Subset

Current feature coverage. Target: practical C99 + MSVC extensions.

IMPL: implemented  ·  PART: parsed, not fully lowered  ·  TODO: not supported

entries: 38    IMPL: 28    PART: 4    TODO: 6

feature status notes
TYPES
int, char, short, long, long long IMPL
unsigned variants IMPL
float, double PART parsing, IR, and type checking only — codegen (SSE2) not implemented
Pointers and pointer arithmetic IMPL
Arrays (fixed size) IMPL
struct and union IMPL
Anonymous struct/union fields IMPL flattened into parent namespace during IR lowering
enum with constant expressions IMPL constants folded at parse time
typedef IMPL cycle detection; multiple declarators per typedef
Bitfields TODO
CONTROL FLOW
if / else IMPL
while, do-while, for IMPL
switch / case / default PART parsed and type-checked; IR lowering not yet implemented
break, continue IMPL
goto and labeled statements PART parsed; IR lowering not yet implemented
return IMPL
FUNCTIONS
Function definitions and calls IMPL
Variadic functions (..., va_list) IMPL __va_start intrinsic; arg registers spilled to shadow space
Function pointers and indirect calls IMPL CALL RAX
More than 4 arguments IMPL args 5+ spilled to stack per x64 ABI
EXPRESSIONS
All binary operators IMPL arithmetic, bitwise, logical, comparison, comma
All assignment operators IMPL = += -= *= /= %= &= |= ^= <<= >>=
Increment / decrement (++, --) IMPL pre and post forms
Ternary operator IMPL
Casts IMPL
sizeof, alignof IMPL correct struct alignment semantics with #pragma pack
Struct member access (. and ->) IMPL
Address-of, dereference IMPL
Struct/array initializer lists ({1, 2, 3}) TODO
PREPROCESSOR
#define macros (object and function-like) IMPL
Variadic macros (__VA_ARGS__) IMPL
Token pasting (##) and stringification (#) IMPL
#include — local and system headers IMPL
#ifdef / #ifndef / #if / #elif IMPL
#pragma pack IMPL push/pop stack; both #pragma pack and __pragma(pack(...)) forms
Windows SDK headers (<windows.h>, <stdio.h>, etc.) IMPL SDK paths discovered at runtime from environment
MSVC extension keywords IMPL __declspec __cdecl __stdcall __int64 __forceinline ...
COMPILER FEATURES
Multi-file compilation (-c + link) IMPL custom CCOBJ001 object format
Dead code elimination IMPL BFS reachability from main over merged reloc graph
Peephole optimizer IMPL stack value tracking, runs to fixed point
Precompiled headers IMPL binary AST + macro + typedef + enum serialization
Semantic type checker IMPL line:col errors before IR lowering
Register allocator TODO currently spills everything to [RBP-N]
Float/double codegen (SSE2) TODO
VLAs TODO
Inline assembly TODO
Debug info (CodeView / PDB) TODO
Linux ELF target TODO System V AMD64 ABI

// roadmap

  • switch statement lowering to conditional branches
  • goto and labeled break/continue
  • Struct and array initializer lists ({1, 2, 3})
  • Floating-point codegen (SSE2)
  • Bitfield support
  • Register allocator (linear scan)
  • Stronger constant propagation and dead-store elimination
  • Debug info (CodeView / PDB)
  • Linux ELF target (System V AMD64 ABI)
  • Test suite with expected-output .c files