Date: Thu, 04 Apr 2024 17:17:14 +0200
Am Donnerstag, dem 04.04.2024 um 16:58 +0200 schrieb Jāāā Gustedt via Liaison:
...
>
> > Why, for heaven's sake, is 'unreachable' a macro in C?
I wanted it to be a function as this is more useful to C as
well, but somehow I was the only one arguing for it.
>
> I don't know what the heavens have to do with it, but as you know C
> has its own objectives and traditions.
>
> From memory, there were two objectives:
>
> - make the feature testable
This seems unnecessary because it comes with C23.
>
> - make it easy for C library providers (usually different from
> compiler implementors) to implement it on top of existing features
> such as `__builtin_unreachable`.
Library providers could provide a function and a macro
as the same time as for any other c library function.
Martin
...
>
> > Why, for heaven's sake, is 'unreachable' a macro in C?
I wanted it to be a function as this is more useful to C as
well, but somehow I was the only one arguing for it.
>
> I don't know what the heavens have to do with it, but as you know C
> has its own objectives and traditions.
>
> From memory, there were two objectives:
>
> - make the feature testable
This seems unnecessary because it comes with C23.
>
> - make it easy for C library providers (usually different from
> compiler implementors) to implement it on top of existing features
> such as `__builtin_unreachable`.
Library providers could provide a function and a macro
as the same time as for any other c library function.
Martin
Received on 2024-04-04 15:17:17