# C 전처리기를 직접 확장하며 놀아본 이야기

Original title: Fun Extending the C Preprocessor

> Hacker News story 50106792 · language: ko · submitted 2026-10-15
> Web version: https://zeli.app/ko/story/50106792
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 55 · by [david2ndaccount](<https://news.ycombinator.com/user?id=david2ndaccount>) · 💬 39
[original](<https://www.davidpriver.com/Fun-Extending-the-C-Preprocessor.html>) · [HN discussion](<https://news.ycombinator.com/item?id=50106792>)

## Summary

C2Y 컴파일러를 취미로 만드는 저자가 C 전처리기에 추가한 재미있는 확장 기능들을 소개한다. __print()와 __where()로 매크로 확장과 정의 위치를 디버깅하고, __map()으로 재귀 제한을 우회해 각 인자에 매크로를 적용하며, __VA_COUNT__로 가변 인자 개수를 바로 얻는다. 전처리기의 미개발된 기계장치를 보완하면 가독성과 사용 편의성이 크게 향상된다는 점을 보여준다.

## Key quote

> C 전처리기는 강력한 도구이지만, 제대로 활용하려면 읽을 수 없는 어두운 마법이 필요하다. 그러나 이는 하고자 하는 일 자체에 내재된 것이 아니라, 단지 그 기계장치가 덜 개발된 결과일 뿐이다.

---

## Cite

- Page: https://zeli.app/ko/story/50106792
- Date: 2026-10-15
- Source: davidpriver.com (https://www.davidpriver.com/Fun-Extending-the-C-Preprocessor.html)
- Hacker News: https://news.ycombinator.com/item?id=50106792

## Other languages

- en: https://zeli.app/story/50106792 · markdown: https://zeli.app/story/50106792.md
- zh: https://zeli.app/zh/story/50106792 · markdown: https://zeli.app/zh/story/50106792.md
- ja: https://zeli.app/ja/story/50106792 · markdown: https://zeli.app/ja/story/50106792.md
- de: https://zeli.app/de/story/50106792 · markdown: https://zeli.app/de/story/50106792.md
- es: https://zeli.app/es/story/50106792 · markdown: https://zeli.app/es/story/50106792.md
- ru: https://zeli.app/ru/story/50106792 · markdown: https://zeli.app/ru/story/50106792.md
