Forward declaration issue

Andre via Digitalmars-d-learn digitalmars-d-learn at
Fri Dec 4 00:12:05 PST 2015


I have a strange issue with following coding.

void baz(); // forward declaration

void foo()
	void bar()
		baz(); // (1) without f.d. syntax error
	void baz()
	baz(); // (2) No linker error if line is removed

void main()

Without the forward declaration, there is a syntax error at (1)
With the forward declaration there is no syntax error but
a linker error at (2). This linker error disappears if line at (2)
is removed.
It looks like a bug, is it?

Kin regards

More information about the Digitalmars-d-learn mailing list