Hacker News new | ask | show | jobs
by gpderetta 43 days ago
The compiler doesn't need to open the same file multiple times. It can remember if a a file is guarded or not every time it sees its name.

My understanding is that this is an optimization that has been available for a very long time now.

The only issue is if a file is referred through multiple names (because of hard links, symlinks, mounts). That might cause the file to be opened again, and can actually break pragma once.

1 comments

Thank you for explaining and looking up the link, it's appreciated! :)