This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/23699] New: patch for #23099 breaks glibmm
- From: "matz at suse dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Sep 2005 15:56:30 -0000
- Subject: [Bug c++/23699] New: patch for #23099 breaks glibmm
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Marks patch for fixing PR23099 from 2005-08-29 makes glibmm not compile:
% cat glib-test.cc
#include <string>
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