This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: namespace related bug


> I get a wrong "first declared here" message in a rather large piece
> of code.  I tried to cut it down, but it is still 1903 lines after
> expanding all includes and macros.

Thanks for your bug report. The bug is still present in g++ 2.95,
although in a different form. The compiler puts the friend declaration
of Hnode into global namespace, instead of the nearest enclosing
namespace.

There is a work-around: Forward-declare Hnode in namespace turbo
before declaring it friend. This works for both compilers.

Regards,
Martin


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]