Andrew Geissler | 78b7279 | 2022-06-14 06:47:25 -0500 | [diff] [blame] | 1 | From ee957eb9e4ec29a462cdbb2f3bbe29d4270534ef Mon Sep 17 00:00:00 2001 |
| 2 | From: Mingli Yu <mingli.yu@windriver.com> |
| 3 | Date: Thu, 2 Jun 2022 13:01:37 +0800 |
| 4 | Subject: [PATCH] proto.h: Fix build with gcc-12 |
| 5 | |
| 6 | Fixes: |
| 7 | In function 'dynprep', |
| 8 | inlined from 'S_sortsv_flags_impl' at pp_sort.c:358:20, |
| 9 | inlined from 'sortsv_amagic_i_ncmp' at pp_sort.c:572:5: |
| 10 | pp_sort.c:1232:1: error: inlining failed in call to 'always_inline' 'S_amagic_i_ncmp': function not considered for inlining |
| 11 | 1232 | S_amagic_i_ncmp(pTHX_ SV *const a, SV *const b) |
| 12 | |
| 13 | Upstream-Status: Submitted [https://github.com/Perl/perl5/pull/19808] |
| 14 | |
| 15 | Signed-off-by: Mingli Yu <mingli.yu@windriver.com> |
| 16 | --- |
| 17 | proto.h | 42 ++++++++++++++---------------------------- |
| 18 | 1 file changed, 14 insertions(+), 28 deletions(-) |
| 19 | |
| 20 | diff --git a/proto.h b/proto.h |
| 21 | index faca6d1..3a76c04 100644 |
| 22 | --- a/proto.h |
| 23 | +++ b/proto.h |
| 24 | @@ -5606,50 +5606,43 @@ STATIC SSize_t S_unpack_rec(pTHX_ struct tempsym* symptr, const char *s, const c |
| 25 | #endif |
| 26 | #if defined(PERL_IN_PP_SORT_C) |
| 27 | #ifndef PERL_NO_INLINE_FUNCTIONS |
| 28 | -PERL_STATIC_FORCE_INLINE I32 S_amagic_cmp(pTHX_ SV *const str1, SV *const str2) |
| 29 | - __attribute__always_inline__; |
| 30 | +PERL_STATIC_FORCE_INLINE I32 S_amagic_cmp(pTHX_ SV *const str1, SV *const str2); |
| 31 | #define PERL_ARGS_ASSERT_AMAGIC_CMP \ |
| 32 | assert(str1); assert(str2) |
| 33 | #endif |
| 34 | |
| 35 | #ifndef PERL_NO_INLINE_FUNCTIONS |
| 36 | -PERL_STATIC_FORCE_INLINE I32 S_amagic_cmp_desc(pTHX_ SV *const str1, SV *const str2) |
| 37 | - __attribute__always_inline__; |
| 38 | +PERL_STATIC_FORCE_INLINE I32 S_amagic_cmp_desc(pTHX_ SV *const str1, SV *const str2); |
| 39 | #define PERL_ARGS_ASSERT_AMAGIC_CMP_DESC \ |
| 40 | assert(str1); assert(str2) |
| 41 | #endif |
| 42 | |
| 43 | #ifndef PERL_NO_INLINE_FUNCTIONS |
| 44 | -PERL_STATIC_FORCE_INLINE I32 S_amagic_i_ncmp(pTHX_ SV *const a, SV *const b) |
| 45 | - __attribute__always_inline__; |
| 46 | +PERL_STATIC_FORCE_INLINE I32 S_amagic_i_ncmp(pTHX_ SV *const a, SV *const b); |
| 47 | #define PERL_ARGS_ASSERT_AMAGIC_I_NCMP \ |
| 48 | assert(a); assert(b) |
| 49 | #endif |
| 50 | |
| 51 | #ifndef PERL_NO_INLINE_FUNCTIONS |
| 52 | -PERL_STATIC_FORCE_INLINE I32 S_amagic_i_ncmp_desc(pTHX_ SV *const a, SV *const b) |
| 53 | - __attribute__always_inline__; |
| 54 | +PERL_STATIC_FORCE_INLINE I32 S_amagic_i_ncmp_desc(pTHX_ SV *const a, SV *const b); |
| 55 | #define PERL_ARGS_ASSERT_AMAGIC_I_NCMP_DESC \ |
| 56 | assert(a); assert(b) |
| 57 | #endif |
| 58 | |
| 59 | #ifndef PERL_NO_INLINE_FUNCTIONS |
| 60 | -PERL_STATIC_FORCE_INLINE I32 S_amagic_ncmp(pTHX_ SV *const a, SV *const b) |
| 61 | - __attribute__always_inline__; |
| 62 | +PERL_STATIC_FORCE_INLINE I32 S_amagic_ncmp(pTHX_ SV *const a, SV *const b); |
| 63 | #define PERL_ARGS_ASSERT_AMAGIC_NCMP \ |
| 64 | assert(a); assert(b) |
| 65 | #endif |
| 66 | |
| 67 | #ifndef PERL_NO_INLINE_FUNCTIONS |
| 68 | -PERL_STATIC_FORCE_INLINE I32 S_amagic_ncmp_desc(pTHX_ SV *const a, SV *const b) |
| 69 | - __attribute__always_inline__; |
| 70 | +PERL_STATIC_FORCE_INLINE I32 S_amagic_ncmp_desc(pTHX_ SV *const a, SV *const b); |
| 71 | #define PERL_ARGS_ASSERT_AMAGIC_NCMP_DESC \ |
| 72 | assert(a); assert(b) |
| 73 | #endif |
| 74 | |
| 75 | #ifndef PERL_NO_INLINE_FUNCTIONS |
| 76 | -PERL_STATIC_FORCE_INLINE I32 S_cmp_desc(pTHX_ SV *const str1, SV *const str2) |
| 77 | - __attribute__always_inline__; |
| 78 | +PERL_STATIC_FORCE_INLINE I32 S_cmp_desc(pTHX_ SV *const str1, SV *const str2); |
| 79 | #define PERL_ARGS_ASSERT_CMP_DESC \ |
| 80 | assert(str1); assert(str2) |
| 81 | #endif |
| 82 | @@ -5671,51 +5664,44 @@ PERL_STATIC_FORCE_INLINE void S_sortsv_flags_impl(pTHX_ SV** array, size_t num_e |
| 83 | #endif |
| 84 | |
| 85 | #ifndef PERL_NO_INLINE_FUNCTIONS |
| 86 | -PERL_STATIC_FORCE_INLINE I32 S_sv_i_ncmp(pTHX_ SV *const a, SV *const b) |
| 87 | - __attribute__always_inline__; |
| 88 | +PERL_STATIC_FORCE_INLINE I32 S_sv_i_ncmp(pTHX_ SV *const a, SV *const b); |
| 89 | #define PERL_ARGS_ASSERT_SV_I_NCMP \ |
| 90 | assert(a); assert(b) |
| 91 | #endif |
| 92 | |
| 93 | #ifndef PERL_NO_INLINE_FUNCTIONS |
| 94 | -PERL_STATIC_FORCE_INLINE I32 S_sv_i_ncmp_desc(pTHX_ SV *const a, SV *const b) |
| 95 | - __attribute__always_inline__; |
| 96 | +PERL_STATIC_FORCE_INLINE I32 S_sv_i_ncmp_desc(pTHX_ SV *const a, SV *const b); |
| 97 | #define PERL_ARGS_ASSERT_SV_I_NCMP_DESC \ |
| 98 | assert(a); assert(b) |
| 99 | #endif |
| 100 | |
| 101 | #ifndef PERL_NO_INLINE_FUNCTIONS |
| 102 | -PERL_STATIC_FORCE_INLINE I32 S_sv_ncmp(pTHX_ SV *const a, SV *const b) |
| 103 | - __attribute__always_inline__; |
| 104 | +PERL_STATIC_FORCE_INLINE I32 S_sv_ncmp(pTHX_ SV *const a, SV *const b); |
| 105 | #define PERL_ARGS_ASSERT_SV_NCMP \ |
| 106 | assert(a); assert(b) |
| 107 | #endif |
| 108 | |
| 109 | #ifndef PERL_NO_INLINE_FUNCTIONS |
| 110 | -PERL_STATIC_FORCE_INLINE I32 S_sv_ncmp_desc(pTHX_ SV *const a, SV *const b) |
| 111 | - __attribute__always_inline__; |
| 112 | +PERL_STATIC_FORCE_INLINE I32 S_sv_ncmp_desc(pTHX_ SV *const a, SV *const b); |
| 113 | #define PERL_ARGS_ASSERT_SV_NCMP_DESC \ |
| 114 | assert(a); assert(b) |
| 115 | #endif |
| 116 | |
| 117 | # if defined(USE_LOCALE_COLLATE) |
| 118 | #ifndef PERL_NO_INLINE_FUNCTIONS |
| 119 | -PERL_STATIC_FORCE_INLINE I32 S_amagic_cmp_locale(pTHX_ SV *const str1, SV *const str2) |
| 120 | - __attribute__always_inline__; |
| 121 | +PERL_STATIC_FORCE_INLINE I32 S_amagic_cmp_locale(pTHX_ SV *const str1, SV *const str2); |
| 122 | #define PERL_ARGS_ASSERT_AMAGIC_CMP_LOCALE \ |
| 123 | assert(str1); assert(str2) |
| 124 | #endif |
| 125 | |
| 126 | #ifndef PERL_NO_INLINE_FUNCTIONS |
| 127 | -PERL_STATIC_FORCE_INLINE I32 S_amagic_cmp_locale_desc(pTHX_ SV *const str1, SV *const str2) |
| 128 | - __attribute__always_inline__; |
| 129 | +PERL_STATIC_FORCE_INLINE I32 S_amagic_cmp_locale_desc(pTHX_ SV *const str1, SV *const str2); |
| 130 | #define PERL_ARGS_ASSERT_AMAGIC_CMP_LOCALE_DESC \ |
| 131 | assert(str1); assert(str2) |
| 132 | #endif |
| 133 | |
| 134 | #ifndef PERL_NO_INLINE_FUNCTIONS |
| 135 | -PERL_STATIC_FORCE_INLINE I32 S_cmp_locale_desc(pTHX_ SV *const str1, SV *const str2) |
| 136 | - __attribute__always_inline__; |
| 137 | +PERL_STATIC_FORCE_INLINE I32 S_cmp_locale_desc(pTHX_ SV *const str1, SV *const str2); |
| 138 | #define PERL_ARGS_ASSERT_CMP_LOCALE_DESC \ |
| 139 | assert(str1); assert(str2) |
| 140 | #endif |
| 141 | -- |
| 142 | 2.25.1 |
| 143 | |