[Prev][Next][Index]

Re: another forward ref problem



>Dennis's mail suggests you might know about this one, but I'll  
>report it anyway. The pc++ parser barfs on the following code  
>(accepted by gcc and Sunpro CC):
>
>	class bar {
>	public:
>	  static struct s *g();
>	};
>	
>	class foo {
>	public:
>	  static f( int x, int b );
>	};
>	
>	struct s { int a; };
>	
>	int main()
>	{
>	  foo::f( 1, (bar::g()->a) );
>	  return 0;
>	}

I haven't been able to find an easy way to fix this. The problem is  
that the parser generates two symbol table entries for struct s: one  
has the scope of class bar, the other has the global scope. I don't  
know how to change this behavior without breaking lots of other  
stuff.        --Beata