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

            Bug ID: 108013
           Summary: `extern "C" int t = 1;` warns about being declared as
                    extern and initialized
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pinskia at gcc dot gnu.org
  Target Milestone: ---

I don't think we should warn about this case:
```
extern "C" int h = 1; 
```

We should warn for:
```
extern int h = 1; 
```
Though.

We already don't warn for:
```
extern "C" { int h = 1; }
```
Which is a small workaround but I don't think it is needed though.

Forwarded from bug 45977 comment #8 .
  • [Bug c++/1080... pinskia at gcc dot gnu.org via Gcc-bugs
    • [Bug c++... manx-bugzilla at problemloesungsmaschine dot de via Gcc-bugs

Reply via email to