https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102979

            Bug ID: 102979
           Summary: GCC gives wrong error for struct definitions without
                    semicolon, despite G++ doing so
           Product: gcc
           Version: 11.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
          Assignee: unassigned at gcc dot gnu.org
          Reporter: konstantinua00 at gmail dot com
  Target Milestone: ---

```
struct test{int i;}
```
https://godbolt.org/z/GEz56T7bT

Current error: "error: expected identifier or '(' at end of input" (points to
"test")

G++ on the other hand gives reasonable:
"error: expected ';' after struct definition"
https://godbolt.org/z/YGqvY7bsa

Is it possible to get G++'s error in GCC too?

Reply via email to