https://gcc.gnu.org/g:e7f3238d66eec925c4183f2e28f148ba4cc223c2
commit r17-3931-ge7f3238d66eec925c4183f2e28f148ba4cc223c2 Author: Kael Andrew Alonzo Franco <[email protected]> Date: Fri Sep 4 12:24:26 2026 -0400 middle-end: Remove all GCC's uses of ENUM_BITFIELD. [PR125507] GCC requires C++14, which supports enum bitfield so ENUM_BITFIELD is removed in GCC. Bootstrapped and regtested on x86_64-pc-linux-gnu. PR middle-end/125507 contrib/ChangeLog: * filter_params.py (filter_src): Remove ENUM_BITFIELD. (FilteringTests): Ditto. gcc/ChangeLog: * gengtype-lex.l: Remove ENUM_BITFIELD. * real.h (struct real_value): Ditto. Signed-off-by: Kael Andrew Franco <[email protected]> Diff: --- contrib/filter_params.py | 10 ---------- gcc/gengtype-lex.l | 3 +-- gcc/real.h | 2 +- 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/contrib/filter_params.py b/contrib/filter_params.py index 359d28b07d2f..0a0d5c559860 100644 --- a/contrib/filter_params.py +++ b/contrib/filter_params.py @@ -63,11 +63,6 @@ def filter_src(text): r'(\1)', text) - # Replace 'ENUM_BITFIELD(enum_name)' with 'enum enum_name'. - text = re.sub('ENUM_BITFIELD\s*\(([^\)]*)\)', - r'enum \1', - text) - return text class FilteringTests(unittest.TestCase): @@ -156,11 +151,6 @@ class FilteringTests(unittest.TestCase): 'char *strcpy PARAMS ((char *dest, char *source));\n', 'char *strcpy (char *dest, char *source);\n') - def test_ENUM_BITFIELD(self): - self.assert_filters_to( - ' ENUM_BITFIELD (sym_intent) intent:2;\n', - ' enum sym_intent intent:2;\n') - def act_on_files(argv): for filename in argv[1:]: with open(filename) as f: diff --git a/gcc/gengtype-lex.l b/gcc/gengtype-lex.l index 7d7e81072ac3..13468e29450c 100644 --- a/gcc/gengtype-lex.l +++ b/gcc/gengtype-lex.l @@ -119,8 +119,7 @@ CXX_KEYWORD inline|public:|private:|protected:|template|operator|friend|static|m return NUM; } -{IWORD}({WS}{IWORD})*/{EOID} | -"ENUM_BITFIELD"{WS}?"("{WS}?{ID}{WS}?")" { +{IWORD}({WS}{IWORD})*/{EOID} { size_t len; for (len = yyleng; ISSPACE (yytext[len-1]); len--) diff --git a/gcc/real.h b/gcc/real.h index e9ddcf5e1717..380dd72b04dd 100644 --- a/gcc/real.h +++ b/gcc/real.h @@ -40,7 +40,7 @@ struct GTY(()) real_value { /* Use the same underlying type for all bit-fields, so as to make sure they're packed together, otherwise REAL_VALUE_TYPE_SIZE will be miscomputed. */ - unsigned int /* ENUM_BITFIELD (real_value_class) */ cl : 2; + unsigned int /* enum real_value_class */ cl : 2; /* 1 if number is decimal floating point. */ unsigned int decimal : 1; /* 1 if number is negative. */
