GCC requires C++14, which supports enum bitfield so ENUM_BITFIELD
is removed in GCC. This assumes that Fortran, D, and Rust patches
to remove ENUM_BITFIELD are accepted.
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]>
---
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 359d28b07d2..0a0d5c55986 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 7d7e81072ac..13468e29450 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 e9ddcf5e171..380dd72b04d 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. */
--
2.55.0