Capabilities

makes every layer
Verifiable behavior

From target version selection and predefined macros to diagnostics, PCH, and real projects, CrucibleCpp does not run on “it should work” — it runs on a repeatable chain of tests.

A

Target version and profile

One preprocessor, three target GCC versions. Whichever version you choose, you get that version's predefined macros,__has_* data and include search paths.

  • --gcc-version=13|14|15
  • --gcc D:\path\to\g++.exe
  • Automatic PATH detection, choosing the highest supported version by default
  • GCC 13.3 / 14.3 / 15.2 profile
  • C++11 / C++14 / C++17 / C++20
B

Diagnostics system

A diagnostic format built for real build systems. It includes the source line, caret, include trace, and warning option — not just an error string.

  • GCC-style severity / option / caret
  • -Werror, -Wno-..., -Werror=...
  • #pragma GCC diagnostic push/pop
  • #pragma GCC system_header
  • -Wsystem-headers and system header suppression
C

Macros and preprocessing semantics

Object-like macros, function-like macros, empty arguments, variadic macros, stringification, token pasting, and GCC's comma deletion extension.

  • # and ##
  • __VA_OPT__(C++20)
  • , ## __VA_ARGS__
  • defined / __has_include
  • macro trace and include graph analysis JSON
D

UCN and #embed

Universal character names take part in identifiers and concatenation;#embed Embeds binary resources according to GCC semantics.

  • \uXXXX / \UXXXXXXXX
  • UCNs formed by backslash-newline
  • # / ## preserves UCN spelling in
  • #embed + limit
  • prefix / suffix / if_empty
  • gnu::offset and __has_embed
E

PCH and cache

GCC 13/14/15 can all use the PCH strategy and cache. The cache does not parse GCC PCH directly; it validates, registers, invalidates, and tracks external .gch.

  • --pch=ignore|warn|error|report
  • CMake PCH layout with forced includes
  • compiler path, version, and hash isolation
  • Atomic writes, directory locks, capacity- and age-based cleanup
  • hit rate / stale / corrupt statistics JSON
F

Reproducible tests

Three GCC toolchains, two differential corpora, and real projects jointly validate the output — not just that “preprocessing succeeded.”

  • GCC15 / 14 / 13: 65/65 CTest each
  • differential corpus 13/13
  • realworld corpus 3/3
  • CrucibleCpp .i → target GCC → exe → run
  • GCC g++.dg/cpp testsuite regression
Positioning

It replaces the preprocessing step, not the compiler

CrucibleCpp does not generate code, does not optimize, and does not parse GCC binary PCH. Its only job is to turn source files into deterministic .i, handing diagnostics, dependencies, and analyzable information to the build system.