RFR (tedious) 8216022: Use #pragma once

Florian Weimer fweimer at redhat.com
Wed Jan 9 18:05:51 UTC 2019


* David Lloyd:

> If there was some way to push for and achieve "#pragma once" inclusion
> in the upstream C/C++ standards, I think that would change the
> arguments substantially.

I believe modules (any variant) will behave in this way: importing a
model will always be idempotent.  I would expect it to be unlikely that
a similar preprocessor feature would be accepted at this point.  The
value of standardization is minimal anyway because it cannot describe
when two files are the same: The standard does not know about hard
links, symbolic links, bind mounts, reparse points, and other things
that there are out there.  But that would be required for complete
interoperability between independent implementations.

Thanks,
Florian


More information about the hotspot-dev mailing list