Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix potential conflict of __attribute__((noreturn)) #23177

Merged
merged 1 commit into from
Apr 7, 2025

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