summaryrefslogtreecommitdiff
path: root/locale
diff options
context:
space:
mode:
authorCollin Funk <collin.funk1@gmail.com>2025-11-03 18:08:37 -0800
committerCollin Funk <collin.funk1@gmail.com>2025-11-04 06:15:54 -0800
commit376e336d92373bf948d1a01429b8524cc6f2a810 (patch)
treebdb8d6c78d16d933cbfb60b48f09f3171cfc8b54 /locale
parent0dfc849eff98812228f3d52af6cb4ad91247711d (diff)
Regenerate charmap-kw.h and locfile-kw.h with gperf 3.3
In commit 970364dac00b38333e5b2d91c90d11e80141d265 we switched some /*FALLTHROUGH*/ comments to [[fallthrough]] to avoid warnings with Clang. However, since gperf emitted different output the buildbot failed. The buildbot has been updated to use gperf 3.3 which will use __attribute__ ((__fallthrough__)) where needed to avoid warnings [1]. This patch regenerates these files with the same version. [1] https://sourceware.org/pipermail/libc-testresults/2025q4/014123.html Reviewed-by: Mark Wielaard <mark@klomp.org>
Diffstat (limited to 'locale')
-rw-r--r--locale/programs/charmap-kw.h34
-rw-r--r--locale/programs/locfile-kw.h26
2 files changed, 52 insertions, 8 deletions
diff --git a/locale/programs/charmap-kw.h b/locale/programs/charmap-kw.h
index 3ae6f2f6f0..c0d8445da5 100644
--- a/locale/programs/charmap-kw.h
+++ b/locale/programs/charmap-kw.h
@@ -1,4 +1,4 @@
-/* ANSI-C code produced by gperf version 3.1 */
+/* ANSI-C code produced by gperf version 3.3 */
/* Command-line: gperf -acCgopt -k'1,2,5,9,$' -L ANSI-C -N charmap_hash charmap-kw.gperf */
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
@@ -104,19 +104,34 @@ hash (register const char *str, register size_t len)
switch (hval)
{
default:
- hval += asso_values[(unsigned char)str[8]];
- [[fallthrough]];
+ hval += asso_values[(unsigned char)str[8]];
+#if (defined __cplusplus && (__cplusplus >= 201703L || (__cplusplus >= 201103L && defined __clang__ && __clang_major__ + (__clang_minor__ >= 9) > 3))) || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 202000L && ((defined __GNUC__ && __GNUC__ >= 10) || (defined __clang__ && __clang_major__ >= 9)))
+ [[fallthrough]];
+#elif (defined __GNUC__ && __GNUC__ >= 7) || (defined __clang__ && __clang_major__ >= 10)
+ __attribute__ ((__fallthrough__));
+#endif
+ /*FALLTHROUGH*/
case 8:
case 7:
case 6:
case 5:
hval += asso_values[(unsigned char)str[4]];
- [[fallthrough]];
+#if (defined __cplusplus && (__cplusplus >= 201703L || (__cplusplus >= 201103L && defined __clang__ && __clang_major__ + (__clang_minor__ >= 9) > 3))) || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 202000L && ((defined __GNUC__ && __GNUC__ >= 10) || (defined __clang__ && __clang_major__ >= 9)))
+ [[fallthrough]];
+#elif (defined __GNUC__ && __GNUC__ >= 7) || (defined __clang__ && __clang_major__ >= 10)
+ __attribute__ ((__fallthrough__));
+#endif
+ /*FALLTHROUGH*/
case 4:
case 3:
case 2:
hval += asso_values[(unsigned char)str[1]];
- [[fallthrough]];
+#if (defined __cplusplus && (__cplusplus >= 201703L || (__cplusplus >= 201103L && defined __clang__ && __clang_major__ + (__clang_minor__ >= 9) > 3))) || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 202000L && ((defined __GNUC__ && __GNUC__ >= 10) || (defined __clang__ && __clang_major__ >= 9)))
+ [[fallthrough]];
+#elif (defined __GNUC__ && __GNUC__ >= 7) || (defined __clang__ && __clang_major__ >= 10)
+ __attribute__ ((__fallthrough__));
+#endif
+ /*FALLTHROUGH*/
case 1:
hval += asso_values[(unsigned char)str[0]];
break;
@@ -127,6 +142,10 @@ hash (register const char *str, register size_t len)
const struct keyword_t *
charmap_hash (register const char *str, register size_t len)
{
+#if (defined __GNUC__ && __GNUC__ + (__GNUC_MINOR__ >= 6) > 4) || (defined __clang__ && __clang_major__ >= 3)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wmissing-field-initializers"
+#endif
static const struct keyword_t wordlist[] =
{
{""}, {""}, {""},
@@ -171,6 +190,9 @@ charmap_hash (register const char *str, register size_t len)
#line 30 "charmap-kw.gperf"
{"g0esc", tok_g0esc, 1}
};
+#if (defined __GNUC__ && __GNUC__ + (__GNUC_MINOR__ >= 6) > 4) || (defined __clang__ && __clang_major__ >= 3)
+#pragma GCC diagnostic pop
+#endif
if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
{
@@ -184,5 +206,5 @@ charmap_hash (register const char *str, register size_t len)
return &wordlist[key];
}
}
- return 0;
+ return (struct keyword_t *) 0;
}
diff --git a/locale/programs/locfile-kw.h b/locale/programs/locfile-kw.h
index f77cf439ff..ad27de1be9 100644
--- a/locale/programs/locfile-kw.h
+++ b/locale/programs/locfile-kw.h
@@ -1,4 +1,4 @@
-/* ANSI-C code produced by gperf version 3.1 */
+/* ANSI-C code produced by gperf version 3.3 */
/* Command-line: gperf -acCgopt -k'1,2,5,9,$' -L ANSI-C -N locfile_hash locfile-kw.gperf */
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
@@ -105,18 +105,33 @@ hash (register const char *str, register size_t len)
{
default:
hval += asso_values[(unsigned char)str[8]];
+#if (defined __cplusplus && (__cplusplus >= 201703L || (__cplusplus >= 201103L && defined __clang__ && __clang_major__ + (__clang_minor__ >= 9) > 3))) || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 202000L && ((defined __GNUC__ && __GNUC__ >= 10) || (defined __clang__ && __clang_major__ >= 9)))
[[fallthrough]];
+#elif (defined __GNUC__ && __GNUC__ >= 7) || (defined __clang__ && __clang_major__ >= 10)
+ __attribute__ ((__fallthrough__));
+#endif
+ /*FALLTHROUGH*/
case 8:
case 7:
case 6:
case 5:
hval += asso_values[(unsigned char)str[4]];
+#if (defined __cplusplus && (__cplusplus >= 201703L || (__cplusplus >= 201103L && defined __clang__ && __clang_major__ + (__clang_minor__ >= 9) > 3))) || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 202000L && ((defined __GNUC__ && __GNUC__ >= 10) || (defined __clang__ && __clang_major__ >= 9)))
[[fallthrough]];
+#elif (defined __GNUC__ && __GNUC__ >= 7) || (defined __clang__ && __clang_major__ >= 10)
+ __attribute__ ((__fallthrough__));
+#endif
+ /*FALLTHROUGH*/
case 4:
case 3:
case 2:
hval += asso_values[(unsigned char)str[1]];
+#if (defined __cplusplus && (__cplusplus >= 201703L || (__cplusplus >= 201103L && defined __clang__ && __clang_major__ + (__clang_minor__ >= 9) > 3))) || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 202000L && ((defined __GNUC__ && __GNUC__ >= 10) || (defined __clang__ && __clang_major__ >= 9)))
[[fallthrough]];
+#elif (defined __GNUC__ && __GNUC__ >= 7) || (defined __clang__ && __clang_major__ >= 10)
+ __attribute__ ((__fallthrough__));
+#endif
+ /*FALLTHROUGH*/
case 1:
hval += asso_values[(unsigned char)str[0]];
break;
@@ -127,6 +142,10 @@ hash (register const char *str, register size_t len)
const struct keyword_t *
locfile_hash (register const char *str, register size_t len)
{
+#if (defined __GNUC__ && __GNUC__ + (__GNUC_MINOR__ >= 6) > 4) || (defined __clang__ && __clang_major__ >= 3)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wmissing-field-initializers"
+#endif
static const struct keyword_t wordlist[] =
{
{""}, {""}, {""},
@@ -602,6 +621,9 @@ locfile_hash (register const char *str, register size_t len)
#line 138 "locfile-kw.gperf"
{"am_pm", tok_am_pm, 0}
};
+#if (defined __GNUC__ && __GNUC__ + (__GNUC_MINOR__ >= 6) > 4) || (defined __clang__ && __clang_major__ >= 3)
+#pragma GCC diagnostic pop
+#endif
if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
{
@@ -615,5 +637,5 @@ locfile_hash (register const char *str, register size_t len)
return &wordlist[key];
}
}
- return 0;
+ return (struct keyword_t *) 0;
}