C++ Namespace Regression

Chip Salzenberg chip@valinux.com
Mon Jun 26 12:59:00 GMT 2000

Apparently, a recent change broke the installation of function
definitions into namespaces.  Consider this source file:

	namespace N {
	    enum { E = 0 };
	    static int f() { return E; }

It won't compile with the current CVS.  But check out the "In function":

	ns.cc: In function `int f ()':
	ns.cc:3: `E' undeclared (first use this function)
	ns.cc:3: (Each undeclared identifier is reported only once for each
	function it appears in.)

Notice that it doesn't say "N::f".
Chip Salzenberg              - a.k.a. -              <chip@valinux.com>
"I wanted to play hopscotch with the impenetrable mystery of existence,
    but he stepped in a wormhole and had to go in early."  // MST3K

More information about the Gcc-bugs mailing list