Skip to content

Commit

Permalink
latest gperf
Browse files Browse the repository at this point in the history
  • Loading branch information
Reini Urban committed Dec 16, 2024
1 parent 575e9d8 commit 49b02a1
Showing 1 changed file with 18 additions and 11 deletions.
29 changes: 18 additions & 11 deletions src/objects.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,45 +110,45 @@ hash (const char *str, size_t len)
{
default:
hval += asso_values[(unsigned char)str[9]];
#if defined __cplusplus && (__cplusplus >= 201703L || (__cplusplus >= 201103L && defined __clang_major__ && defined __clang_minor__ && __clang_major__ + (__clang_minor__ >= 9) > 3))
#if (defined __cplusplus && (__cplusplus >= 201703L || (__cplusplus >= 201103L && defined __clang__ && __clang_major__ + (__clang_minor__ >= 9) > 3))) || (__STDC_VERSION__ >= 202000L && ((defined __GNUC__ && __GNUC__ >= 10) || (defined __clang__ && __clang_major__ >= 9)))
[[fallthrough]];
#elif defined __GNUC__ && __GNUC__ >= 7
#elif (defined __GNUC__ && __GNUC__ >= 7) || (defined __clang__ && __clang_major__ >= 10)
__attribute__ ((__fallthrough__));
#endif
/*FALLTHROUGH*/
case 9:
case 8:
hval += asso_values[(unsigned char)str[7]+1];
#if defined __cplusplus && (__cplusplus >= 201703L || (__cplusplus >= 201103L && defined __clang_major__ && defined __clang_minor__ && __clang_major__ + (__clang_minor__ >= 9) > 3))
#if (defined __cplusplus && (__cplusplus >= 201703L || (__cplusplus >= 201103L && defined __clang__ && __clang_major__ + (__clang_minor__ >= 9) > 3))) || (__STDC_VERSION__ >= 202000L && ((defined __GNUC__ && __GNUC__ >= 10) || (defined __clang__ && __clang_major__ >= 9)))
[[fallthrough]];
#elif defined __GNUC__ && __GNUC__ >= 7
#elif (defined __GNUC__ && __GNUC__ >= 7) || (defined __clang__ && __clang_major__ >= 10)
__attribute__ ((__fallthrough__));
#endif
/*FALLTHROUGH*/
case 7:
case 6:
hval += asso_values[(unsigned char)str[5]];
#if defined __cplusplus && (__cplusplus >= 201703L || (__cplusplus >= 201103L && defined __clang_major__ && defined __clang_minor__ && __clang_major__ + (__clang_minor__ >= 9) > 3))
#if (defined __cplusplus && (__cplusplus >= 201703L || (__cplusplus >= 201103L && defined __clang__ && __clang_major__ + (__clang_minor__ >= 9) > 3))) || (__STDC_VERSION__ >= 202000L && ((defined __GNUC__ && __GNUC__ >= 10) || (defined __clang__ && __clang_major__ >= 9)))
[[fallthrough]];
#elif defined __GNUC__ && __GNUC__ >= 7
#elif (defined __GNUC__ && __GNUC__ >= 7) || (defined __clang__ && __clang_major__ >= 10)
__attribute__ ((__fallthrough__));
#endif
/*FALLTHROUGH*/
case 5:
case 4:
case 3:
hval += asso_values[(unsigned char)str[2]];
#if defined __cplusplus && (__cplusplus >= 201703L || (__cplusplus >= 201103L && defined __clang_major__ && defined __clang_minor__ && __clang_major__ + (__clang_minor__ >= 9) > 3))
#if (defined __cplusplus && (__cplusplus >= 201703L || (__cplusplus >= 201103L && defined __clang__ && __clang_major__ + (__clang_minor__ >= 9) > 3))) || (__STDC_VERSION__ >= 202000L && ((defined __GNUC__ && __GNUC__ >= 10) || (defined __clang__ && __clang_major__ >= 9)))
[[fallthrough]];
#elif defined __GNUC__ && __GNUC__ >= 7
#elif (defined __GNUC__ && __GNUC__ >= 7) || (defined __clang__ && __clang_major__ >= 10)
__attribute__ ((__fallthrough__));
#endif
/*FALLTHROUGH*/
case 2:
hval += asso_values[(unsigned char)str[1]];
#if defined __cplusplus && (__cplusplus >= 201703L || (__cplusplus >= 201103L && defined __clang_major__ && defined __clang_minor__ && __clang_major__ + (__clang_minor__ >= 9) > 3))
#if (defined __cplusplus && (__cplusplus >= 201703L || (__cplusplus >= 201103L && defined __clang__ && __clang_major__ + (__clang_minor__ >= 9) > 3))) || (__STDC_VERSION__ >= 202000L && ((defined __GNUC__ && __GNUC__ >= 10) || (defined __clang__ && __clang_major__ >= 9)))
[[fallthrough]];
#elif defined __GNUC__ && __GNUC__ >= 7
#elif (defined __GNUC__ && __GNUC__ >= 7) || (defined __clang__ && __clang_major__ >= 10)
__attribute__ ((__fallthrough__));
#endif
/*FALLTHROUGH*/
Expand Down Expand Up @@ -803,6 +803,10 @@ static const struct stringpool_t stringpool_contents =
const struct _dwg_dxfname *
in_word_set (const char *str, 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 _dwg_dxfname wordlist[] =
{
{-1}, {-1}, {-1},
Expand Down Expand Up @@ -1687,6 +1691,9 @@ in_word_set (const char *str, size_t len)
#line 357 "src/objects.in"
{(int)(size_t)&((struct stringpool_t *)0)->stringpool_str1271, "UNKNOWN_OBJ", DWG_TYPE_UNKNOWN_OBJ, 0, STABLE}
};
#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)
{
Expand All @@ -1704,7 +1711,7 @@ in_word_set (const char *str, size_t len)
}
}
}
return 0;
return (struct _dwg_dxfname *) 0;
}
#line 368 "src/objects.in"

Expand Down

0 comments on commit 49b02a1

Please sign in to comment.