<gpg-error.h> needs to use __noreturn__ instead of noreturn to avoid incompatibilities with C11, and specifically <stdnoreturn.h>. see https://github.com/systemd/systemd/pull/8456
I will attach a patch
<gpg-error.h> needs to use __noreturn__ instead of noreturn to avoid incompatibilities with C11, and specifically <stdnoreturn.h>. see https://github.com/systemd/systemd/pull/8456
I will attach a patch
rG GnuPG | |||
rGd5e29991c0c7 dirmngr:dns,doc,gpg: Fix for noreturn for C11. | |||
rC libgcrypt | |||
rC000c50e07819 Fix use of noreturn. | |||
rE libgpg-error | |||
rEa86ad1cbb6bd yat2m: Use __noreturn__ attribute. | |||
rE3eee9efc46f9 core: Fix problem with C11 and stdnoreturn.h. |
Oh dear, adding new keywords which have not been reserved in the past was a bad idea by C11. This will eventually require fixes at lot of places because the noreturn attribute is widely used ( other common headers may include the noreturn header as well).
Anyway, for libgpg-error it will be easy to do.
Pushed similar changes for GnuPG and libgcrypt (which are actually harmless as it is internal use, not exposed header).
Actually, noreturn isn't a keyword. The keyword is _Noreturn. noreturn is a convenience macro, which is provided in the header stdnoreturn.h. Funny enough, _Noreturn and the macro noreturn will be deprecated with C23 in favor of the new attribute [[noreturn]]. :-)
https://en.cppreference.com/w/c/language/_Noreturn
@ikloecker Thank you for the pointer.
When people will use C23 compiler, there will be no problem (even with non-fixed version). That's good. :-)