Skip to content

Commit df4834b

Browse files
peteretonycoz
authored andcommitted
Fix potential conflict of __attribute__((noreturn))
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.
1 parent aed235e commit df4834b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

perl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ Now a no-op.
438438
# define __attribute__nonnull__(a) __attribute__((nonnull(a)))
439439
#endif
440440
#ifdef HASATTRIBUTE_NORETURN
441-
# define __attribute__noreturn__ __attribute__((noreturn))
441+
# define __attribute__noreturn__ __attribute__((__noreturn__))
442442
#endif
443443
#ifdef HASATTRIBUTE_PURE
444444
# define __attribute__pure__ __attribute__((pure))

0 commit comments

Comments
 (0)