Recursive macro expansion triggers clang crash
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
Compiling:
$ clang-20 -std=gnu2x -O0 -c ../macro-expansion-repro.c
Causes the included crash.
This is a simplified version of a more elaborate chain in my library [libfyaml](https://github.com/pantoniou/libfyaml)
and triggers in a much reduced nesting level.
[clang-crash.txt](https://github.com/user-attachments/files/27193578/clang-crash.txt)
[macro-expansion-repro.c](https://github.com/user-attachments/files/27193581/macro-expansion-repro.c)
[macro-expansion-repro-9dfd14.sh](https://github.com/user-attachments/files/27193776/macro-expansion-repro-9dfd14.sh)
[macro-expansion-repro-9dfd14.c](https://github.com/user-attachments/files/27193780/macro-expansion-repro-9dfd14.c)
Contributor guide
Assessment
This issue has not been assessed yet.