extern(C) on var decl is confusing

user1234 user1234 at 12.de
Sun Jul 27 23:23:40 UTC 2025


That is confusing, e.g

```
extern(C) int r;

int main()
{
     return r;
}
```

works. But what is likely more intended here is

```
extern int r;

int main()
{
     return r;
}
```

which leads, this time, to the expected linker error.


More information about the Digitalmars-d-learn mailing list