On Sun, 17 Dec 2023, Martin Uecker wrote:
> diff --git a/gcc/testsuite/gcc.dg/c23-tag-enum-1.c
> b/gcc/testsuite/gcc.dg/c23-tag-enum-1.c
> new file mode 100644
> index 000..a81a5afc456
> --- /dev/null
> +++ b/gcc/testsuite/gcc.dg/c23-tag-enum-1.c
> +void test2(void)
> +{
> + enum ee *a;
Allow redefinition of enum types and enumerators. Diagnose
nested redefinitions including redefinitions in the enum
specifier for enum types with fixed underlying type.
gcc/c:
* c-tree.h (c_parser_enum_specifier): Add parameter.
* c-decl.cc (start_enum): Allow redefinition.
On Mon, 27 Nov 2023, Martin Uecker wrote:
> + enum B : short { M = 1 } *y2e = &x2;/* { dg-warning "incompatible"
> } */
This probably now needs to be dg-error because
-Wincompatible-pointer-types is now an error by default. OK with that
changed as needed (you may also need such a chan
(only tests were changed)
c23: tag compatibility rules for enums
Allow redefinition of enum types and enumerators. Diagnose
nested redefinitions including redefinitions in the enum
specifier for enum types with fixed underlying type.
gcc/c:
* c-tree.h (c_parser_enum_specifier): Add p
On Thu, 16 Nov 2023, Martin Uecker wrote:
> +enum tt { R = 2 } TT;
> +enum tt {
> + R = _Generic(&TT, enum tt*: 0, default: 2)
> +};
> +// incomplete during construction
> +
> +enum A { B = 7 } y;
> +enum A { B = 7 };
> +
> +enum A { B = _Generic(&y, enum A*: 1, default: 7) };
I don't follow
Allow redefinition of enum types and enumerators. Diagnose
nested redefinitions including redefinitions in the enum
specifier for enum types with fixed underlying type.
gcc/c:
* c-tree.h (c_parser_enum_specifier): Add parameter.
* c-decl.cc (start_enum): Allow redefinition.