typedef + extern

Sakari Jalovaara sja at sirius.hut.fi
Tue Aug 21 19:33:01 AEST 1990


Speaking of nits, how about this:

	typedef int x;

	void f () { extern int x; x = 5; }

Is the second declaration of "x" legal?

If it is, what linkage does "x" have?  3.1.2.2 would suggest that the
second declaration "has the same linkage as any visible declaration of
the identifier with file scope" -- i.e. none?
									++sja



More information about the Comp.std.c mailing list