Puzzled by this behavior
Ola Fosheim Grøstad
ola.fosheim.grostad at gmail.com
Tue May 31 20:58:32 UTC 2022
On Tuesday, 31 May 2022 at 20:47:36 UTC, Steven Schveighoffer
wrote:
> So I assume it's similar to declaring functions, but I don't
> know the reason it allows this for function prototypes at the
> module level.
Maybe he didn't think about mutual recursion.
Anyway, this is legal in C++:
```
extern int x;
extern int x;
void f();
void f();
void f(){ x=0;}
int x = 1;
```
More information about the Digitalmars-d
mailing list