On 16 January 2018 at 13:47, Vojtech Horky <[email protected]> wrote:
> Hello.
>
> 2018-01-15 20:56 GMT+01:00 Jiří Zárevúcky <[email protected]>:
>>> - It's not standard.
>>>
>>> True, but meaningless. We use plenty of nonstandard extensions. It's
>>> literally impossible to implement libc without using some.
>>>
>>> - Some archaic/toy compiler may not support it.
>>>
>>> Also true, but as JJ said, such a compiler wouldn't build HelenOS
>>> anyway. #pragma once is supported by any half-serious C compiler (see
>>> https://en.wikipedia.org/wiki/Pragma_once).
>
> I think we should distinguish whether we are talking about the public
> headers or the implementation itself. While it is true that a toy
> compiler will not compile the whole HelenOS, such toy compiler can
> still be used to compile against HelenOS headers. Not a common case
> but due to simplicity of our library not a completely impossible one
> either.
>
> And I would say that especially for system (libc) headers we should be
> as conservative as possible.
>

A valid concern. Although it would be easy to provide a tool that automatically
replaces `#pragma once` with a regular header guard. Easier than checking
that present header guard is well-formed, that is.

-- jzr

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

Reply via email to