RFR (tedious) 8216022: Use #pragma once
Florian Weimer
fweimer at redhat.com
Fri Jan 4 18:59:32 UTC 2019
* David Lloyd:
> The whole thing is starting to seem like a really bad idea to me.
> I've been asking around and I can't find anyone who thinks this kind
> of change is a good idea; while this clearly isn't a scientific poll,
> it does not on the other hand raise my confidence any. It was pointed
> out to me that the GCC documentation has been recommending against
> this practice perhaps as early as 3.4.
I've always found this a bit disingenuous because any bug in #pragma
once would be a bug in #import for the Objective-C frontend and would
need fixing in libcpp anyway.
For some reason, it's a very emotional topic. Since #pragma once
documents the intent in a clearer fashion than include guards, migrating
off it again should be very easy.
On the hand, the renaming problem could also be fixed by just using
random identifiers as the include guard that are not derived from the
header file name. 8-)
Thanks,
Florian
More information about the hotspot-dev
mailing list