From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1742 invoked by alias); 2 Sep 2005 15:57:10 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 1632 invoked by uid 48); 2 Sep 2005 15:56:30 -0000 Date: Fri, 02 Sep 2005 15:57:00 -0000 From: "matz at suse dot de" To: gcc-bugs@gcc.gnu.org Message-ID: <20050902155627.23699.matz@suse.de> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/23699] New: patch for #23099 breaks glibmm X-Bugzilla-Reason: CC X-SW-Source: 2005-09/txt/msg00263.txt.bz2 List-Id: Marks patch for fixing PR23099 from 2005-08-29 makes glibmm not compile: % cat glib-test.cc #include struct A{ static const long npos = std::string::npos; }; % g++ -c glib-test.cc glib-test.cc:3: error: field initializer is not constant Reverting it makes this compile again. To fail it seems to need that the type of std::string::npos comes from a template argument member (the allocator of std::string in this case). Easier tests do compile. Also doing the initialization of A::npos outside the class definition makes this compile. -- Summary: patch for #23099 breaks glibmm Product: gcc Version: 4.0.2 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ AssignedTo: mark at codesourcery dot com ReportedBy: matz at suse dot de CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23699