>Number: 3351 >Category: c++ >Synopsis: GCC 3.0 does not compile template-friend in nested template-struct. >Confidential: no >Severity: non-critical >Priority: low >Responsible: unassigned >State: open >Class: rejects-legal >Submitter-Id: net >Arrival-Date: Thu Jun 21 17:56:00 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Jens Lindström >Release: 3.0 >Organization: Opera Software >Environment: System: Linux tooth 2.4.3-xfs-1.0 #3 Wed May 2 22:56:26 CEST 2001 i686 unknown Architecture: i686 host: i686-pc-linux-gnu build: i686-pc-linux-gnu target: i686-pc-linux-gnu configured with: ../gcc-3.0/configure --sysconfdir=/etc --localstatedir=/var --prefix=/usr/pkg/gcc-3.0 --enable-threads --enable-languages=c++ >Description: The following code works correctly: #include using namespace std; template struct s; template ostream& operator<<(ostream &o, const typename s::t &x) { return o; } template struct s { struct t { friend ostream& operator<<(ostream&, const typename s::t &); }; t x; }; int main() { s::t y; cout << y; } but if the member 'x' in 'struct s' is removed, the compliler issues the following error: templ.cc: In instantiation of `s::t': templ.cc:24: instantiated from here templ.cc:17: `à%@à”@' redeclared as different kind of symbol templ.cc:17: sorry, not implemented: `integer_cst' not supported by dump_decl cc1plus: previous declaration of `' templ.cc:17: confused by earlier errors, bailing out >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: