From mboxrd@z Thu Jan 1 00:00:00 1970 From: luca.formaggia@epfl.ch To: gcc-gnats@gcc.gnu.org Subject: libstdc++/3738: static member variables are well handled by containers Date: Thu, 19 Jul 2001 12:06:00 -0000 Message-id: <20010719185733.20463.qmail@sourceware.cygnus.com> X-SW-Source: 2001-07/msg00529.html List-Id: >Number: 3738 >Category: libstdc++ >Synopsis: static member variables are well handled by containers >Confidential: no >Severity: critical >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Thu Jul 19 12:06:01 PDT 2001 >Closed-Date: >Last-Modified: >Originator: luca.formaggia@epfl.ch >Release: gcc version 3.0 >Organization: >Environment: i686-pc-linux-gnu Linux kernel 2.4.3-12 on intel PIII (i686) >Description: Cannot access a public static member of an object A contained in a stl container by simply using container[n].static_member (it compiles but loader gives undefined reference) It works if I assign A foo=container[n]; and then foo.static member. >How-To-Repeat: just compile with g++ the not_working.cc file. The working.cc contains the workaround (which compiles and runs fine). >Fix: I do not know (apart the workaround) >Release-Note: >Audit-Trail: >Unformatted: ----gnatsweb-attachment---- Content-Type: application/octet-stream; name="example.tgz" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="example.tgz"