We've had discussion on #pragma once in june last year and agreed to stay 
with classic header guards instead. And we didn't even take into
consideration the discussion in:

http://open-std.org/JTC1/SC22/WG21/docs/papers/2017/p0538r0.html

which is another point against using #pragma once.

Regards,
Jiri
---------- Původní e-mail ----------
Od: Jiří Zárevúcky <[email protected]>
Komu: HelenOS development mailing list <[email protected]>
Datum: 15. 1. 2018 17:16:36
Předmět: Re: [HelenOS-devel] Reserved identifiers in libc
"On 15 January 2018 at 17:04, Jakub Jermář <[email protected]> wrote:
> On 01/15/2018 04:29 PM, Jiří Zárevúcky wrote:
>> On 15 January 2018 at 14:03, Jiri Svoboda <[email protected]>
wrote:
>>> I agree that we shouldn't use non-reserved identifiers, because it's
>>> necessary to be standards conformant. However, using a _HELENOS prefix
seems
>>> too paranoid. The worst that could happen is that upon a compiler
upgrade we
>>> could get a conflict, but this is rather unprobable. No libc I know of
does
>>> this.
>>>
>>> Solaris libc, GNU libc, libmusl all use header guard _STDIO_H for stdio.
h
>>>
>>> I really wouldn't worry so much. Using _HELENOS prefix everywhere is 
just
>>> too ugly and has very little benefit.
>>>
>>
>> I was under the impression that both you and JJ are concerned about this
>> possibility of conflict. Hence the defensive prefix. If that impression
was
>> incorrect, then I completely agree with you. :)
>
> As far as header guards are concerned, I have grown fond of #pragma
> once. We have caught about 5 occurrences of copy-pasted or mismatched
> #ifndef X, #define X pairs in HelenOS.
>

I'm fairly certain now there is no technical reason not to use '#pragma 
once'.
I very much support getting rid of header guards, and I'd gladly make it 
happen.

-- jzr

_______________________________________________
HelenOS-devel mailing list
[email protected]
http://lists.modry.cz/listinfo/helenos-devel
"
_______________________________________________
HelenOS-devel mailing list
[email protected]
http://lists.modry.cz/listinfo/helenos-devel

Reply via email to