st 11. 2. 2026 v 12:03 odesílatel Wander Lairson Costa
<[email protected]> napsal:
> > `#pragma once` in timerlat_u.h is needed for pre-C23 compilers to avoid
> > redefinition errors.
>
> Isn't it necessary for C23 compilers?
>

C23 allowed struct redefinition [1] to enable template-like macros. As
a side effect, including timerlat_u.h twice does not break anything,
in C23 only. But the Linux kernel supports building with lower
standards of C, so it has to work there, too.

Tomas

[1] https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3003.pdf


Reply via email to