RFR (tedious) 8216022: Use #pragma once

coleen.phillimore at oracle.com coleen.phillimore at oracle.com
Fri Jan 4 14:17:52 UTC 2019



On 1/4/19 8:19 AM, Andrew Haley wrote:
> On 1/4/19 11:07 AM, Florian Weimer wrote:
>> The guards occasionally cause bugs because they are not globally unique
>> or not spelled correctly in both places in the header file.
> Yeah, I know. That's the usual non-performance-related pro-#pragma
> once argument. After GCC and a bunch of other compilers implemented
> optimized include guards I thought that #pragma once would go away,
> but evidently not.  :-)
>
It's not really a performance consideration, since with and without 
pragma once, the performance of building hotspot is the same.  It's the 
annoyance of maintaining these guard strings, and the 
one-more-thing-to-remember if you move a file.

Thanks,
Coleen


More information about the hotspot-dev mailing list