------- Additional Comments From lerdsuwa at gcc dot gnu dot org 2005-01-13 14:55 ------- It is already described in changes.html:
When declaring a friend class using an unqualified name, classes outside the innermost non-class scope are not searched ... -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14513