logoalt Hacker News

uecker • 12/09/2024 • 1 reply • view on HN

It is neither portable nor obviously correct.


Replies

quotemstr • 12/09/2024

Yes, it's both. It works fine in real world million line codebases. I have never, not once, seen a bug or portability issue caused by it. I have seen multiple header guard macro names collide.

Eschewing pragma once these days is pure ignorance and superstition --- then again, so is writing new code in C at all.

➕ show 2 replies