RFR (tedious) 8216022: Use #pragma once

Andrew Haley aph at redhat.com
Thu Jan 3 18:39:01 UTC 2019


On 1/3/19 3:50 PM, Erik Österlund wrote:

> I think the value of moving to #pragma once instead of using include
> guards is that it is easy to mess up include guards. Admittedly, at
> least I tend to get them wrong quite often, and every time I get
> annoyed that we don't use #pragma once


> ... Might be exaggerating a bit... but still.

Maybe. :-)

But seriously, how often do you actually have to create a new header
file, or even edit the part of a header file that touched the include
guards? The reason this bug hasn't got much love at GCC is that over
there nobody (including, until today, me) could ever see the point of
include guards. It seems to me that they are a rather fragile way of
fixing a nonexistent problem.

But hey, if it's really important to you, go ahead. This issue isn't
something I'm prepared to go to the barricades for.

-- 
Andrew Haley
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671


More information about the hotspot-dev mailing list