Skip to content

Conversation

@petere
Copy link
Contributor

@petere petere commented Apr 6, 2025

If <stdnoreturn.h> is included first, then noreturn is defined to _Noreturn, and then __attribute__((noreturn)) will end up being __attribute__((_Noreturn)), which would not be recognized and might result in a compiler warning. To avoid this, use the alternative spelling __attribute__((__noreturn__)) instead. This is supported by the same compiler versions.

  • This set of changes does not require a perldelta entry.

If <stdnoreturn.h> is included first, then noreturn is defined to
_Noreturn, and then __attribute__((noreturn)) will end up being
__attribute__((_Noreturn)), which would not be recognized and might
result in a compiler warning.  To avoid this, use the alternative
spelling __attribute__((__noreturn__)) instead.  This is supported by
the same compiler versions.
@Leont
Copy link
Contributor

Leont commented Apr 6, 2025

It sounds sensible, but I hate that this is necessary.

@tonycoz tonycoz merged commit df4834b into Perl:blead Apr 7, 2025
34 checks passed
@petere petere deleted the fix-attribute-noreturn branch April 8, 2025 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants