Regenerate charmap-kw.h and locfile-kw.h with gperf 3.3

In commit 970364dac0 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>
This commit is contained in:
Collin Funk 2025-11-03 18:08:37 -08:00
parent 0dfc849eff
commit 376e336d92
2 changed files with 52 additions and 8 deletions

View File

@ -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;
}

View File

@ -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;
}