Re: [PATCH] c++: pedwarn for empty unnamed enum in decl [PR67048]

2022-04-29 Thread Jason Merrill via Gcc-patches
On 4/29/22 10:12, Marek Polacek wrote: [dcl.dcl]/5 says that enum { }; is ill-formed, and since r197742 we issue a pedwarn. However, the pedwarn also fires for enum { } x; which is well-formed. So only warn when {} is followed by a ;. This should be correct since you can't have "enu

[PATCH] c++: pedwarn for empty unnamed enum in decl [PR67048]

2022-04-29 Thread Marek Polacek via Gcc-patches
[dcl.dcl]/5 says that enum { }; is ill-formed, and since r197742 we issue a pedwarn. However, the pedwarn also fires for enum { } x; which is well-formed. So only warn when {} is followed by a ;. This should be correct since you can't have "enum {}, " -- that produces "expected unqualif