c++: Add test [PR95288]

Somewhat improved by r11-2064, though we still generate junk that seems
redundant.  But at least it says
error: expected ‘}’ before ‘.’ token

	PR c++/95288
	* g++.dg/diagnostic/enum2.C: New test.
This commit is contained in:
Marek Polacek 2020-07-13 13:05:06 -04:00
parent 776e48e093
commit 6a9a3434c7

View File

@ -0,0 +1,10 @@
// PR c++/95288
void f()
{
enum X
{ // { dg-message "to match this" }
a. // { dg-error "expected" }
b
}; // { dg-error "extra" "" { target c++98_only } }
} // { dg-error "expected" }