Skip to content

Releases

V3.0.1

Choose a tag to compare

@tomatoOyster tomatoOyster released this 16 Nov 19:40

CrucibleCpp Preprocessor V3.0.1

Windows x64 standalone C++ preprocessor for GCC 13.3 / 14.3 / 15.2.

修复

  • 保留 GCC -E 输出中的 digraph 拼写(如 <:),避免真实项目模板参数被破坏。
  • 修复 <:: 在输出 token 间被错误插入空格的问题。
  • 真实项目 corpus 现在要求预处理和编译真正成功,不能把“两边都失败”误判为通过。
  • 修正 nlohmann/json 的 include 布局为 nlohmann/json.hpp。

验证

  • 从 GitHub 的干净目录重新 clone、CMake/Ninja 从零构建成功。
  • GCC15/14/13 三套源码构建成功。
  • 真实项目:nlohmann/json、fmt、spdlog 预处理、编译、运行通过。
  • PCH:GCC13/14/15 的 pch_policy 和 pch_cache 通过。

许可证

V3.0.0 及以后为 CC BY-NC 4.0;V2.9.0 及以前为 MIT,见 LICENSE / LICENSE-MIT。

资产

  • cruciblecpp-preprocessor.exe
  • cruciblecpp-preprocessor-v3.0.1-win64.zip
  • SHA256SUMS.txt

SHA-256

8a0928adefbfb01c9bd69965d6cd4e96fede61d904e47c98f365d8cdeec96b32  cruciblecpp-preprocessor.exe
369494155360d2d66b227974aa997d6e9df93443ab27b60e62d0a9bacca28454  cruciblecpp-preprocessor-v3.0.1-win64.zip

V3.0.0

Choose a tag to compare

@tomatoOyster tomatoOyster released this 16 Nov 18:44

CrucibleCpp Preprocessor V3.0.0

Windows x64 standalone C++ preprocessor for GCC 13.3 / 14.3 / 15.2.

许可证变更

  • V3.0.0 及以后:CC BY-NC 4.0(署名、非商业使用)。
  • V2.9.0 及以前:MIT,旧许可证文本保留在 LICENSE-MIT。
  • 商业使用需要单独授权。

PCH 完整支持

  • 移除 GCC13/14 禁用 PCH 的限制。
  • 修复 GCC13/14 PCH magic 校验,支持 gpch+014... / gpch+015...。
  • PCH 缓存 manifest 记录编译器路径、版本、可执行文件哈希和选项 hash,跨 GCC 版本不会误命中。
  • GCC13/14/15 的 pch_policy、pch_cache 全部启用并通过。

测试

  • GCC15:65/65 passed
  • GCC14:65/65 passed
  • GCC13:65/65 passed
  • 每个正例:CrucibleCpp 预处理 .i -> 对应 GCC 编译成 exe -> 运行
  • differential:13/13
  • realworld:3/3

资产

  • cruciblecpp-preprocessor.exe
  • cruciblecpp-preprocessor-v3.0.0-win64.zip
  • SHA256SUMS.txt

SHA-256

391bdf64863f8268e733d4e24680cd6d1a63ae896ade971e76efd973b511a84b  cruciblecpp-preprocessor.exe
cc10891feee510003b999642de43d10a379dc0e9de7d75fe5f2c37fa74e72723  cruciblecpp-preprocessor-v3.0.0-win64.zip

V2.9.0

Choose a tag to compare

@tomatoOyster tomatoOyster released this 16 Nov 18:04

CrucibleCpp Preprocessor V2.9.0

Windows x64 standalone C++ preprocessor for GCC 13.3 / 14.3 / 15.2.

新增

  • GCC 13.3 / 14.3 的 C++11 / C++14 / C++17 / C++20 predefined-macro profile。
  • GCC 13 / 14 的完整 __has_builtin、__has_attribute、__has_cpp_attribute、__has_feature / __has_extension 数据。
  • --gcc-version=13|14|15 选择目标 GCC 大版本。
  • --gcc <g++.exe> 指定具体目标编译器。
  • 自动扫描 PATH 中的 g++/gcc/c++,默认选择最高支持版本;不依赖固定安装目录。
  • GCC13/14 启用 PCH 时明确报错退出(PCH 目前只支持 GCC15)。
  • GCC15 / GCC14 / GCC13 三套 CTest 目标选择和三编译器 smoke matrix。

测试

  • GCC15 套件:65/65 passed。
  • GCC14 核心套件:61/61 passed。
  • GCC13 核心套件:61/61 passed。
  • 三编译器 smoke matrix:18/18 passed。
  • 每个正例均执行:CrucibleCpp 预处理 .i -> 对应 GCC 编译成 exe -> 运行。

已知未完成

  • GCC13/14 的 realworld corpus 和完整 differential corpus 尚未全部通过;GCC14 的 standard_filesystem 差分暴露 __add_lval_ref_t 缺失问题,外部测试耗时也超过当前超时。
  • GCC13/14 的 PCH 测试按设计跳过;PCH 暂时只支持 GCC15。

资产

  • cruciblecpp-preprocessor.exe
  • cruciblecpp-preprocessor-v2.9.0-win64.zip
  • SHA256SUMS.txt

SHA-256

4217fde70b3f9382e41c20c0b236b130f77629c65278836a9d2f8423b56b9238  cruciblecpp-preprocessor.exe
78cd7ce0f92cb307fdf0a2528991e94900a167f552ad59ab40fc3e4a307e04e9  cruciblecpp-preprocessor-v2.9.0-win64.zip

V2.7.0

Choose a tag to compare

@tomatoOyster tomatoOyster released this 14 Nov 08:30

CrucibleCpp Preprocessor V2.7.0

Windows x64 standalone C++ preprocessor for MinGW-w64 UCRT64 GCC 15.2.

更新

  • 增加 C++11 / C++17 / C++20 三套独立 GCC 15.2 predefined-macro profile:
    • -std=c++11 使用 C++11 profile
    • -std=c++17 使用 C++17 profile
    • -std=c++20 使用 C++20 profile
    • 三套 profile 都包含对应 __cpp_* 和内置宏
  • 实现 #embed:
    • 二进制字节嵌入
    • limit、gnu::offset、prefix、suffix、if_empty
    • --embed-dir 搜索
    • 引号和尖括号路径
  • 实现 __has_embed,返回 0/1/2(缺失/非空/空资源)。
  • 完整 UCN 标识符支持:
    • \uXXXX / \UXXXXXXXX
    • 反斜杠换行形成的 UCN
    • # / ## 中的 UCN 拼写保留
    • UCN 合法性检查和规范化输出

修复

  • __cplusplus 缺少 L 后缀。
  • __has_builtin(__builtin_operator_new/delete) 应返回 201802。
  • __has_cpp_attribute(__no_unique_address__) 双下划线处理。
  • fatal include 后仍继续输出 token。
  • /* within comment 误报。
  • shift 溢出 severity。
  • 未终止字符串 severity。
  • _Pragma 缺少括号。
  • #pragma pack 被误报为 unknown pragma。
  • raw string 字符串化换行。
  • #warning C++23 pedantic 文案。

测试

  • 常规 CTest:63/63 passed
  • 配置 GCC_TESTSUITE_DIR:64/64 passed
  • Differential corpus:11/11 passed
  • GCC g++.dg/cpp testsuite:46 passed / 0 failed / 31 skipped

资产

  • cruciblecpp-preprocessor.exe
  • cruciblecpp-preprocessor-v2.7.0-win64.zip
  • SHA256SUMS.txt

SHA-256

0e37f55c2f8b967809b961267dee603e9115e7f94fc003c60c3e52c7f2208746  cruciblecpp-preprocessor.exe
d3420295feabd247cf2f1401dc4e71889260c0932caa81d4395c0e51b5cc19a0  cruciblecpp-preprocessor-v2.7.0-win64.zip

V2.6.1

Choose a tag to compare

@tomatoOyster tomatoOyster released this 12 Nov 15:34

CrucibleCpp Preprocessor V2.6.1

Windows x64 standalone C++20 preprocessor for MinGW-w64 UCRT64 GCC 15.2.

Diagnostics

  • GCC-style source line and caret output.
  • Include trace with include-site line numbers.
  • Macro redefinition warning with previous-definition note; new definition wins.
  • GCC wording for missing includes, #error / #warning, invalid directives, unterminated conditionals and macro invocations.
  • #pragma GCC diagnostic push/pop/ignored/warning/error.
  • #pragma GCC system_header and -isystem warning suppression, with -Wsystem-headers.
  • #pragma GCC poison and #pragma GCC dependency.
  • #pragma GCC target/optimize/visibility pass-through.

Warning options

Implemented preprocessor warning controls including:

-Wundef, -Wunused-macros, -Wcomment, -Wtrigraphs, -Wdate-time, -Wexpansion-to-defined, -Wmultichar, -Wendif-labels, -Wbuiltin-macro-redefined, -Wcpp, -Wextra-tokens, -Wunknown-pragmas, -Wpragmas, -Winvalid-pch, -Woverflow, -Wnewline-eof.

Also:

  • -W<name> / -Wno-<name>
  • -Werror / -Wno-error
  • -Werror=<name> / -Wno-error=<name>
  • -Wall / -Wextra / -Wpedantic
  • -Wsystem-headers / -Wno-system-headers
  • -f[no-]diagnostics-show-option

Warnings append [-W...]; warnings promoted to errors append [-Werror=...].

Also included

  • Complete GCC 15.2 __has_* tables.
  • Character-constant edge behavior from V2.5.1.
  • Optional -trigraphs.
  • PCH artifact cache.

Assets

  • cruciblecpp-preprocessor.exe
  • cruciblecpp-preprocessor-v2.6.1-win64.zip
  • SHA256SUMS.txt

SHA-256

78948e26ccbf2c7ff59e1f2afa82a97f829d167e72ee87c5b48a4fbf8578b81c  cruciblecpp-preprocessor.exe
2c5ca694183fc701055605fbe71614455edac697d903840eeea2570fef02fe40  cruciblecpp-preprocessor-v2.6.1-win64.zip

62/62 CTest passed.

V2.5.0

Choose a tag to compare

@tomatoOyster tomatoOyster released this 12 Nov 09:09

CrucibleCpp Preprocessor V2.5.0

Windows x64 standalone C++20 preprocessor for MinGW-w64 UCRT64 GCC 15.2.

Complete GCC 15.2 __has_* tables

Generated from GCC 15.2 source and queried against the actual GCC 15.2 compiler:

  • 1699 __has_builtin builtins/type traits
  • 149 __has_attribute attributes
  • 295 __has_cpp_attribute standard and gnu:: attributes with values
  • 53 __has_feature / __has_extension C++20 features
  • Scoped attributes such as __has_cpp_attribute(gnu::always_inline)
  • Wrapped attributes such as __has_attribute(__always_inline__)

Generator: tools/generate_gcc_has_data.py

Other changes

  • PCH artifact cache and dependency management from V2.4.1
  • PCH policy, include graph, macro trace and VS Code integration remain supported

Assets

  • cruciblecpp-preprocessor.exe
  • cruciblecpp-preprocessor-v2.5.0-win64.zip
  • SHA256SUMS.txt

SHA-256

51a82af130ffe292acb702c21686071e35336b4a272adec8ff17b955c6d4251a  cruciblecpp-preprocessor.exe
d8eb517e146b5f0012b21a85eb9ed20d7ba4c1cf63182f9da2d762fbd4d10103  cruciblecpp-preprocessor-v2.5.0-win64.zip

57/57 CTest passed.

V2.2.0

Choose a tag to compare

@tomatoOyster tomatoOyster released this 11 Nov 18:45

CrucibleCpp Preprocessor V2.2.0

Windows x64 standalone C++20 preprocessor for MinGW-w64 UCRT64 GCC 15.2.

New

  • -newyear: print days until next January 1 and ignore all other arguments.
  • --analysis-json : emit include edges and a rich macro-expansion trace.
  • Macro trace includes definition location, invocation text, parent/child call tree, raw/expanded arguments, and #/## steps.
  • Source-file macro events are preserved even when libstdc++ produces thousands of internal events.
  • Supports the official VS Code extension 0.4.1 macro animation and include graph.

Requirements

  • Windows x64
  • MinGW-w64 UCRT64 GCC 15.2
  • C++20

Assets

  • cruciblecpp-preprocessor.exe — standalone static executable
  • cruciblecpp-preprocessor-v2.2.0-win64.zip — executable, README, license and docs
  • SHA256SUMS.txt

SHA-256

8d5e47a3fc02013831bca90c2924159e87548065e437a89a1d030fad286c2dd5  cruciblecpp-preprocessor.exe
38a6ef59dde071e887441d931c138c597c80704afe6f1b3c2e466bbda79d9c04  cruciblecpp-preprocessor-v2.2.0-win64.zip

VS Code extension

https://github.com/tomatoOyster/cruciblecpp-vscode/releases/tag/v0.4.1

V2.0.0

Choose a tag to compare

@tomatoOyster tomatoOyster released this 11 Nov 13:12

CrucibleCpp Preprocessor V2.0.0

第二个公开发行版本。

新功能

  • 从 PATH 自动发现 GCC:
    • g++.exe
    • gcc.exe
    • c++.exe
  • 执行 g++ -std=c++20 -E -v -x c++ -,解析 GCC 的隐式 include 搜索列表。
  • #include <...> 现在可以直接使用标准库头,不需要手动传 -isystem。
  • --print-gcc-includes 打印发现结果。
  • -nostdinc / --no-gcc-includes 关闭自动发现。
  • -v 打印 GCC 路径、版本和 include 目录。

搜索顺序

#include "..."
  当前文件目录
  → -I
  → -isystem
  → PATH 中 GCC 的 include 目录

#include <...>
  -I
  → -isystem
  → PATH 中 GCC 的 include 目录

<> 仍然不搜索当前文件目录。

示例

.\cruciblecpp-preprocessor.exe -P main.cpp -o main.i
g++ -std=c++20 -O2 main.i -o main.exe

查看 GCC 路径:

.\cruciblecpp-preprocessor.exe --print-gcc-includes

验证

  • 34 个 CTest。
  • 无显式 -isystem 的 <vector>/<string>/<iostream> 测试。
  • -nostdinc 负例。
  • <windows.h> 和用户 main.cpp 回归。
  • 完整静态 Windows x64 发行包。

许可证

MIT,见 LICENSE。

下载

  • cruciblecpp-preprocessor-v2.0.0-win64.zip — 完整包
  • cruciblecpp-preprocessor.exe — 仅可执行文件
  • SHA256SUMS.txt — 校验和

SHA-256

2a3333b41aa383c794f410078e73d1923ced45b3e5386331ce70954563dc0a3d  cruciblecpp-preprocessor.exe
65e7b2a8be3fb42759416fcd078100eaf7c958343f42d49b0f5cb61ea0333e0d  cruciblecpp-preprocessor-v2.0.0-win64.zip

V1.0.2

Choose a tag to compare

@tomatoOyster tomatoOyster released this 11 Nov 12:42

CrucibleCpp Preprocessor V1.0.2

项目名称更正版本。

名称变更

此前项目名少了一个 l,本次统一补上并修改所有相关标识:

CrucibleCpp
cruciblecpp
namespace crucible

统一修改:

  • 可执行文件:cruciblecpp-preprocessor.exe
  • 仓库:https://github.com/tomatoOyster/cruciblecpp-preprocessor
  • CMake 项目:cruciblecpp_preprocessor
  • CMake 目标:cruciblecpp-preprocessor
  • C++ namespace:crucible
  • 发行包:cruciblecpp-preprocessor-v1.0.2-win64.zip
  • 文档、示例、测试和命令行输出

功能

  • Windows x64 独立 C++20 预处理器。
  • 支持 #include "..." 和 #include <...>。
  • 支持 #include_next、__has_include、GCC 15.2 宏 profile。
  • 支持 CMake/Ninja depfile。
  • 紧凑输出:默认模式用行标记保持诊断行号,不再输出大量空行。

系统要求

  • Windows x64
  • MinGW-w64 UCRT64 GCC 15.2.0
  • C++20

快速开始

.\cruciblecpp-preprocessor.exe --version

g++ -std=c++20 -O2 main.i -o main.exe

标准库头的 include 路径仍需显式传入;CMake 项目可使用 CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES。

验证

  • 31/31 CTest 通过。
  • <vector>、<string>、<iostream>、<filesystem>、<windows.h> 等真实头文件通过。
  • 用户真实 main.cpp 预处理 0 错误,GCC 编译/链接 0 错误。

许可证

MIT,见 LICENSE。

下载

  • cruciblecpp-preprocessor-v1.0.2-win64.zip — 完整包
  • cruciblecpp-preprocessor.exe — 仅可执行文件
  • SHA256SUMS.txt — 校验和

SHA-256

fc21c20ddf8f40ca4ec2ab9d8e9b6eac5f0c0e3baddb3f6f0544fccf67209961  cruciblecpp-preprocessor.exe
640041106ed702085348a522b8c25fb3d73857958f1643e546bcb1d694789b2d  cruciblecpp-preprocessor-v1.0.2-win64.zip