public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/23699] New: patch for #23099 breaks glibmm
@ 2005-09-02 15:57 matz at suse dot de
  2005-09-02 16:01 ` [Bug c++/23699] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: matz at suse dot de @ 2005-09-02 15:57 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug c++/23699] [4.0/4.1 Regression] patch for #23099 breaks glibmm
  2005-09-02 15:57 [Bug c++/23699] New: patch for #23099 breaks glibmm matz at suse dot de
@ 2005-09-02 16:01 ` pinskia at gcc dot gnu dot org
  2005-09-02 16:15 ` matz at suse dot de
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-02 16:01 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-09-02 16:01 -------
Related to PR 23691 but this one fails on the mainline too. 

Reducing.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |rejects-valid
      Known to fail|                            |4.0.2 4.1.0
      Known to work|                            |3.4.0
            Summary|patch for #23099 breaks     |[4.0/4.1 Regression] patch
                   |glibmm                      |for #23099 breaks glibmm
   Target Milestone|---                         |4.0.2


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23699


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug c++/23699] [4.0/4.1 Regression] patch for #23099 breaks glibmm
  2005-09-02 15:57 [Bug c++/23699] New: patch for #23099 breaks glibmm matz at suse dot de
  2005-09-02 16:01 ` [Bug c++/23699] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
@ 2005-09-02 16:15 ` matz at suse dot de
  2005-09-02 16:38 ` [Bug c++/23699] [4.0/4.1 Regression] rejects static int as non constant after "extern template" pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: matz at suse dot de @ 2005-09-02 16:15 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From matz at suse dot de  2005-09-02 16:14 -------
Yes, I also got the boost error.  And I got that with a 4.0 CVS version 
from today.  Reverting Marks patch also solves the boost problem 
described in PR23691. 

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23699


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug c++/23699] [4.0/4.1 Regression] rejects static int as non constant after "extern template"
  2005-09-02 15:57 [Bug c++/23699] New: patch for #23099 breaks glibmm matz at suse dot de
  2005-09-02 16:01 ` [Bug c++/23699] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
  2005-09-02 16:15 ` matz at suse dot de
@ 2005-09-02 16:38 ` pinskia at gcc dot gnu dot org
  2005-09-03 18:19 ` cvs-commit at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-02 16:38 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-09-02 16:37 -------
Reduced testcase:
template<typename _CharT > class basic_string;
typedef basic_string<char> string;
template<typename _CharT>
struct basic_string
{
  static const int npos = -1;
};
extern template class basic_string<char>;
struct A
{
  static const long npos = string::npos;
};

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-09-02 16:37:51
               date|                            |
            Summary|[4.0/4.1 Regression] patch  |[4.0/4.1 Regression] rejects
                   |for #23099 breaks glibmm    |static int as non constant
                   |                            |after "extern template"


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23699


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug c++/23699] [4.0/4.1 Regression] rejects static int as non constant after "extern template"
  2005-09-02 15:57 [Bug c++/23699] New: patch for #23099 breaks glibmm matz at suse dot de
                   ` (2 preceding siblings ...)
  2005-09-02 16:38 ` [Bug c++/23699] [4.0/4.1 Regression] rejects static int as non constant after "extern template" pinskia at gcc dot gnu dot org
@ 2005-09-03 18:19 ` cvs-commit at gcc dot gnu dot org
  2005-09-03 18:27 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-09-03 18:19 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-09-03 18:18 -------
Subject: Bug 23699

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	mmitchel@gcc.gnu.org	2005-09-03 18:18:48

Modified files:
	gcc/cp         : ChangeLog decl2.c parser.c semantics.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/g++.dg/ext: static1.C 

Log message:
	PR c++/23699
	* decl2.c (mark_used): Always instantiate static data members
	initialized by constant expressions.
	* pt.c (instantiate_decl): Instantiate the initializers for static
	data members initialized by constant expressions.
	
	PR c++/21687
	* semantics.c (expand_or_defer_fn): Do not call ggc_collect when
	finishing processing for a template function in a local class.
	Revert:
	2005-09-02  Mark Mitchell  <mark@codesourcery.com>
	* parser.c (cp_parser_class_specifier): Push/pop GC contexts
	around functions in local classes.
	
	PR c++/23699
	* g++.dg/ext/static1.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4867&r2=1.4868
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl2.c.diff?cvsroot=gcc&r1=1.795&r2=1.796
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&r1=1.354&r2=1.355
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/semantics.c.diff?cvsroot=gcc&r1=1.483&r2=1.484
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5999&r2=1.6000
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/static1.C.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23699


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug c++/23699] [4.0/4.1 Regression] rejects static int as non constant after "extern template"
  2005-09-02 15:57 [Bug c++/23699] New: patch for #23099 breaks glibmm matz at suse dot de
                   ` (3 preceding siblings ...)
  2005-09-03 18:19 ` cvs-commit at gcc dot gnu dot org
@ 2005-09-03 18:27 ` cvs-commit at gcc dot gnu dot org
  2005-09-03 18:30 ` cvs-commit at gcc dot gnu dot org
  2005-09-03 18:45 ` mmitchel at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-09-03 18:27 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-09-03 18:27 -------
Subject: Bug 23699

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	mmitchel@gcc.gnu.org	2005-09-03 18:27:39

Modified files:
	gcc/cp         : pt.c 

Log message:
	PR c++/23699
	* decl2.c (mark_used): Always instantiate static data members
	initialized by constant expressions.
	* pt.c (instantiate_decl): Instantiate the initializers for static
	data members initialized by constant expressions.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/pt.c.diff?cvsroot=gcc&r1=1.1027&r2=1.1028



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23699


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug c++/23699] [4.0/4.1 Regression] rejects static int as non constant after "extern template"
  2005-09-02 15:57 [Bug c++/23699] New: patch for #23099 breaks glibmm matz at suse dot de
                   ` (4 preceding siblings ...)
  2005-09-03 18:27 ` cvs-commit at gcc dot gnu dot org
@ 2005-09-03 18:30 ` cvs-commit at gcc dot gnu dot org
  2005-09-03 18:45 ` mmitchel at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-09-03 18:30 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-09-03 18:29 -------
Subject: Bug 23699

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-4_0-branch
Changes by:	mmitchel@gcc.gnu.org	2005-09-03 18:29:47

Modified files:
	gcc/testsuite  : ChangeLog 
	gcc/cp         : ChangeLog decl2.c parser.c pt.c semantics.c 
Added files:
	gcc/testsuite/g++.dg/ext: static1.C 

Log message:
	PR c++/23699
	* decl2.c (mark_used): Always instantiate static data members
	initialized by constant expressions.
	* pt.c (instantiate_decl): Instantiate the initializers for static
	data members initialized by constant expressions.
	
	PR c++/21687
	* semantics.c (expand_or_defer_fn): Do not call ggc_collect when
	finishing processing for a template function in a local class.
	Revert:
	2005-09-02  Mark Mitchell  <mark@codesourcery.com>
	* parser.c (cp_parser_class_specifier): Push/pop GC contexts
	around functions in local classes.
	
	PR c++/23699
	* g++.dg/ext/static1.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.5084.2.369&r2=1.5084.2.370
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/static1.C.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.4648.2.88&r2=1.4648.2.89
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl2.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.770.2.4&r2=1.770.2.5
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.319.2.15&r2=1.319.2.16
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/pt.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.978.2.20&r2=1.978.2.21
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/semantics.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.463.2.6&r2=1.463.2.7



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23699


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug c++/23699] [4.0/4.1 Regression] rejects static int as non constant after "extern template"
  2005-09-02 15:57 [Bug c++/23699] New: patch for #23099 breaks glibmm matz at suse dot de
                   ` (5 preceding siblings ...)
  2005-09-03 18:30 ` cvs-commit at gcc dot gnu dot org
@ 2005-09-03 18:45 ` mmitchel at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-09-03 18:45 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2005-09-03 18:45 -------
Fixed in 4.0.2.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23699


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2005-09-03 18:45 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-02 15:57 [Bug c++/23699] New: patch for #23099 breaks glibmm matz at suse dot de
2005-09-02 16:01 ` [Bug c++/23699] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
2005-09-02 16:15 ` matz at suse dot de
2005-09-02 16:38 ` [Bug c++/23699] [4.0/4.1 Regression] rejects static int as non constant after "extern template" pinskia at gcc dot gnu dot org
2005-09-03 18:19 ` cvs-commit at gcc dot gnu dot org
2005-09-03 18:27 ` cvs-commit at gcc dot gnu dot org
2005-09-03 18:30 ` cvs-commit at gcc dot gnu dot org
2005-09-03 18:45 ` mmitchel at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).