public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/26266]  New: ICE
@ 2006-02-13 19:43 igodard at pacbell dot net
  2006-02-13 19:44 ` [Bug c++/26266] ICE igodard at pacbell dot net
                   ` (26 more replies)
  0 siblings, 27 replies; 28+ messages in thread
From: igodard at pacbell dot net @ 2006-02-13 19:43 UTC (permalink / raw)
  To: gcc-bugs




-- 
           Summary: ICE
           Product: gcc
           Version: 4.0.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: igodard at pacbell dot net


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


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

* [Bug c++/26266] ICE
  2006-02-13 19:43 [Bug c++/26266] New: ICE igodard at pacbell dot net
  2006-02-13 19:44 ` [Bug c++/26266] ICE igodard at pacbell dot net
@ 2006-02-13 19:44 ` igodard at pacbell dot net
  2006-02-13 20:25 ` pinskia at gcc dot gnu dot org
                   ` (24 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: igodard at pacbell dot net @ 2006-02-13 19:44 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from igodard at pacbell dot net  2006-02-13 19:44 -------
Created an attachment (id=10840)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10840&action=view)
compiler output


-- 


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


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

* [Bug c++/26266] ICE
  2006-02-13 19:43 [Bug c++/26266] New: ICE igodard at pacbell dot net
@ 2006-02-13 19:44 ` igodard at pacbell dot net
  2006-02-13 19:44 ` igodard at pacbell dot net
                   ` (25 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: igodard at pacbell dot net @ 2006-02-13 19:44 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from igodard at pacbell dot net  2006-02-13 19:44 -------
Created an attachment (id=10841)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10841&action=view)
source code (compressed)


-- 


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


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

* [Bug c++/26266] ICE
  2006-02-13 19:43 [Bug c++/26266] New: ICE igodard at pacbell dot net
  2006-02-13 19:44 ` [Bug c++/26266] ICE igodard at pacbell dot net
  2006-02-13 19:44 ` igodard at pacbell dot net
@ 2006-02-13 20:25 ` pinskia at gcc dot gnu dot org
  2006-02-13 20:29 ` pinskia at gcc dot gnu dot org
                   ` (23 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-02-13 20:25 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 5455 bytes --]



------- Comment #3 from pinskia at gcc dot gnu dot org  2006-02-13 20:25 -------
I should say this is rejected in 4.1.0:
../include/row.hh: In member function ‘row<T>::operator const row<const T>()
const [with T = unsigned int]’:
../include/powerset.hh:1027:   instantiated from ‘row<range<T> > powerset<E,
alloc>::ranges(row<R>) [with R = unsigned int, E = unsigned int, alloc =
standardAllocator]’
../include/powerset.hh:479:   instantiated from ‘powerset<E,
alloc>::powerset(row<R>, const alloc<range<T> >&) [with R = unsigned int, E =
unsigned int, alloc = standardAllocator]’
../include/display.hh:199:   instantiated from ‘basicDisplay<ch,
tr>::basicDisplay(std::basic_ostream<_CharT, _Traits>&) [with ch = char, tr =
std::char_traits<char>]’
../src/display.cc:8:   instantiated from here
../include/row.hh:210: error: conversion from ‘const range<const unsigned
int*>’ to non-scalar type ‘const row<const unsigned int>’ requested
../include/powerset.hh: In member function ‘bool powerset<E,
alloc>::insert(range<U>) [with R = wchar_t, E = wchar_t, alloc =
standardAllocator]’:
../include/powerset.hh:863:   instantiated from ‘std::pair<typename powerset<E,
alloc>::iterator, bool> powerset<E, alloc>::insert(const E&) [with E = wchar_t,
alloc = standardAllocator]’
../include/powerset.hh:533:   instantiated from ‘powerset<E, alloc>&
powerset<E, alloc>::operator<<(const E&) [with E = wchar_t, alloc =
standardAllocator]’
../include/display.hh:200:   instantiated from ‘basicDisplay<ch,
tr>::basicDisplay(std::basic_ostream<_CharT, _Traits>&) [with ch = wchar_t, tr
= std::char_traits<wchar_t>]’
../src/display.cc:17:   instantiated from here
../include/powerset.hh:889: error: no matching function for call to
‘newRow(int, range<wchar_t>&)’
../include/row.hh: In member function ‘row<void>::operator row<T>() [with T =
unsigned int]’:
../include/accum.hh:363:   instantiated from ‘row<R>
accum<alloc>::frame<T>::space() [with T = unsigned int, alloc =
standardAllocator]’
../include/accum.hh:250:   instantiated from
‘accum<alloc>::frame<T>::frame(accum<alloc>&) [with T = unsigned int, alloc =
standardAllocator]’
../include/powerset.hh:1026:   instantiated from ‘row<range<T> > powerset<E,
alloc>::ranges(row<R>) [with R = unsigned int, E = unsigned int, alloc =
standardAllocator]’
../include/powerset.hh:479:   instantiated from ‘powerset<E,
alloc>::powerset(row<R>, const alloc<range<T> >&) [with R = unsigned int, E =
unsigned int, alloc = standardAllocator]’
../include/display.hh:199:   instantiated from ‘basicDisplay<ch,
tr>::basicDisplay(std::basic_ostream<_CharT, _Traits>&) [with ch = char, tr =
std::char_traits<char>]’
../src/display.cc:8:   instantiated from here
../include/row.hh:786: error: conversion from ‘const range<size_t*>’ to
non-scalar type ‘row<unsigned int>’ requested
../include/row.hh: In member function ‘row<void>::operator row<T>() [with T =
char]’:
../include/allocator.hh:484:   instantiated from ‘void allocatorMixin<void,
D>::deallocate(row<void>) [with D = standardAllocator]’
../include/accum.hh:226:   instantiated from ‘void
accum<alloc>::spare(row<void>) [with alloc = standardAllocator]’
../include/accum.hh:262:   instantiated from ‘accum<alloc>::frame<T>::~frame()
[with T = range<unsigned int>, alloc = standardAllocator]’
../include/powerset.hh:1014:   instantiated from ‘row<range<T> > powerset<E,
alloc>::ranges(row<R>) [with R = unsigned int, E = unsigned int, alloc =
standardAllocator]’
../include/powerset.hh:479:   instantiated from ‘powerset<E,
alloc>::powerset(row<R>, const alloc<range<T> >&) [with R = unsigned int, E =
unsigned int, alloc = standardAllocator]’
../include/display.hh:199:   instantiated from ‘basicDisplay<ch,
tr>::basicDisplay(std::basic_ostream<_CharT, _Traits>&) [with ch = char, tr =
std::char_traits<char>]’
../src/display.cc:8:   instantiated from here
../include/row.hh:786: error: conversion from ‘const range<char*>’ to
non-scalar type ‘row<char>’ requested
../include/row.hh: In member function ‘row<T>::operator const row<const T>()
const [with T = wchar_t]’:
../include/display.hh:345:   instantiated from ‘void basicDisplay<ch,
tr>::textBreak() [with ch = wchar_t, tr = std::char_traits<wchar_t>]’
../include/display.hh:157:   instantiated from ‘int basicDisplay<ch,
tr>::sync() [with ch = wchar_t, tr = std::char_traits<wchar_t>]’
../include/display.hh:99:   instantiated from ‘basicDisplay<ch,
tr>::~basicDisplay() [with ch = wchar_t, tr = std::char_traits<wchar_t>]’
../src/display.cc:20:   instantiated from here
../include/row.hh:210: error: conversion from ‘const range<const wchar_t*>’ to
non-scalar type ‘const row<const wchar_t>’ requested
../include/row.hh: In member function ‘row<T>::operator const row<const T>()
const [with T = char]’:
../include/display.hh:345:   instantiated from ‘void basicDisplay<ch,
tr>::textBreak() [with ch = char, tr = std::char_traits<char>]’
../include/display.hh:157:   instantiated from ‘int basicDisplay<ch,
tr>::sync() [with ch = char, tr = std::char_traits<char>]’
../include/display.hh:99:   instantiated from ‘basicDisplay<ch,
tr>::~basicDisplay() [with ch = char, tr = std::char_traits<char>]’
../src/display.cc:20:   instantiated from here
../include/row.hh:210: error: conversion from ‘const range<const char*>’ to
non-scalar type ‘const row<const char>’ requested


-- 


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


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

* [Bug c++/26266] ICE
  2006-02-13 19:43 [Bug c++/26266] New: ICE igodard at pacbell dot net
                   ` (2 preceding siblings ...)
  2006-02-13 20:25 ` pinskia at gcc dot gnu dot org
@ 2006-02-13 20:29 ` pinskia at gcc dot gnu dot org
  2006-02-14 17:13 ` [Bug c++/26266] [4.0/4.1/4.2 regression] Trouble with static const data members in template classes reichelt at gcc dot gnu dot org
                   ` (22 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-02-13 20:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pinskia at gcc dot gnu dot org  2006-02-13 20:29 -------
And I should say 4.1.0 is correct to reject this code.


-- 


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


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

* [Bug c++/26266] [4.0/4.1/4.2 regression] Trouble with static const data members in template classes
  2006-02-13 19:43 [Bug c++/26266] New: ICE igodard at pacbell dot net
                   ` (3 preceding siblings ...)
  2006-02-13 20:29 ` pinskia at gcc dot gnu dot org
@ 2006-02-14 17:13 ` reichelt at gcc dot gnu dot org
  2006-02-14 19:26 ` mark at codesourcery dot com
                   ` (21 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-02-14 17:13 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from reichelt at gcc dot gnu dot org  2006-02-14 17:13 -------
Confirmed.

The ICE can be reduced to the following valid code snippet:

======================================
template<typename> struct A;

template<> struct A<char>
{
    static const char i = 1;
};

template<typename T> struct B
{
    static const int j = A<T>::i;
    static const int k = int(j);
    int x[k];
};

B<char> b;
======================================

bug.cc: In instantiation of 'const int B<char>::k':
bug.cc:12:   instantiated from 'B<char>'
bug.cc:15:   instantiated from here
bug.cc:11: internal compiler error: in build_c_cast, at cp/typeck.c:5231
Please submit a full bug report, [etc.]

This problem appeared with gcc 4.0.2, but does not show on the
current 4.0 branch. The ICE probably got only papered over, since
the following valid code is rejected now (it also caused an ICE
that appeared in GCC 4.0.2):

======================================
template<typename> struct A
{
    static const int i = 1;
};

template<typename> struct B
{
    static const int j = A<char>::i;
    static const int k = int(j);
    int x[k];
};

B<char> b;
======================================

bug.cc:13: error: variable-size type declared outside of any function
bug.cc:13: error: variable-size type declared outside of any function

This problem also exists on the 4.1 branch and mainline.

Last, but not least, the following valid code snippet is rejected
on the current 4.0 branch, as well as 4.1 branch and mainline:

======================================
template<typename> struct A
{
    static const int i = 1;
    static const int j = i;
    static const int k = int(j);
    int x[k];
};

A<char> a;
======================================

Mark, would you consider this a showstopper for the 4.1 release?


-- 

reichelt at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mark at codesourcery dot
                   |                            |com, reichelt at gcc dot gnu
                   |                            |dot org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |ice-on-valid-code,
                   |                            |monitored, rejects-valid
   Last reconfirmed|0000-00-00 00:00:00         |2006-02-14 17:13:05
               date|                            |
            Summary|ICE                         |[4.0/4.1/4.2 regression]
                   |                            |Trouble with static const
                   |                            |data members in template
                   |                            |classes
   Target Milestone|---                         |4.0.3


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


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

* [Bug c++/26266] [4.0/4.1/4.2 regression] Trouble with static const data members in template classes
  2006-02-13 19:43 [Bug c++/26266] New: ICE igodard at pacbell dot net
                   ` (4 preceding siblings ...)
  2006-02-14 17:13 ` [Bug c++/26266] [4.0/4.1/4.2 regression] Trouble with static const data members in template classes reichelt at gcc dot gnu dot org
@ 2006-02-14 19:26 ` mark at codesourcery dot com
  2006-02-14 20:38 ` reichelt at gcc dot gnu dot org
                   ` (20 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: mark at codesourcery dot com @ 2006-02-14 19:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from mark at codesourcery dot com  2006-02-14 19:26 -------
Subject: Re:  [4.0/4.1/4.2 regression] Trouble with static
 const data members in template classes

reichelt at gcc dot gnu dot org wrote:
> ------- Comment #5 from reichelt at gcc dot gnu dot org  2006-02-14 17:13 -------
> Confirmed.
> 
> The ICE can be reduced to the following valid code snippet:

Investigating.


-- 


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


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

* [Bug c++/26266] [4.0/4.1/4.2 regression] Trouble with static const data members in template classes
  2006-02-13 19:43 [Bug c++/26266] New: ICE igodard at pacbell dot net
                   ` (5 preceding siblings ...)
  2006-02-14 19:26 ` mark at codesourcery dot com
@ 2006-02-14 20:38 ` reichelt at gcc dot gnu dot org
  2006-02-14 20:40 ` igodard at pacbell dot net
                   ` (19 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-02-14 20:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from reichelt at gcc dot gnu dot org  2006-02-14 20:38 -------
One more datapoint:
The following invalid testcase is accepted since GCC 4.0.2:

===============================
template<int> struct A
{
    static const int i = A();
};

A<0> a;
===============================


-- 

reichelt at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |accepts-invalid


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


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

* [Bug c++/26266] [4.0/4.1/4.2 regression] Trouble with static const data members in template classes
  2006-02-13 19:43 [Bug c++/26266] New: ICE igodard at pacbell dot net
                   ` (6 preceding siblings ...)
  2006-02-14 20:38 ` reichelt at gcc dot gnu dot org
@ 2006-02-14 20:40 ` igodard at pacbell dot net
  2006-02-18  6:49 ` mmitchel at gcc dot gnu dot org
                   ` (18 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: igodard at pacbell dot net @ 2006-02-14 20:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from igodard at pacbell dot net  2006-02-14 20:40 -------
Gee, I turn over a rock and all sorts of creepy-crawlies come out :-)


-- 


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


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

* [Bug c++/26266] [4.0/4.1/4.2 regression] Trouble with static const data members in template classes
  2006-02-13 19:43 [Bug c++/26266] New: ICE igodard at pacbell dot net
                   ` (7 preceding siblings ...)
  2006-02-14 20:40 ` igodard at pacbell dot net
@ 2006-02-18  6:49 ` mmitchel at gcc dot gnu dot org
  2006-02-18  8:36 ` mmitchel at gcc dot gnu dot org
                   ` (17 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-02-18  6:49 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from mmitchel at gcc dot gnu dot org  2006-02-18 06:49 -------
I'm currently testing a patch for all of the critical problems in this PR;
we'll be left with an accepts-invalid regression, which would only be P2.


-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |mark at codesourcery dot com
                   |dot org                     |
             Status|NEW                         |ASSIGNED
           Priority|P3                          |P1


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


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

* [Bug c++/26266] [4.0/4.1/4.2 regression] Trouble with static const data members in template classes
  2006-02-13 19:43 [Bug c++/26266] New: ICE igodard at pacbell dot net
                   ` (8 preceding siblings ...)
  2006-02-18  6:49 ` mmitchel at gcc dot gnu dot org
@ 2006-02-18  8:36 ` mmitchel at gcc dot gnu dot org
  2006-02-18  8:37 ` mmitchel at gcc dot gnu dot org
                   ` (16 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-02-18  8:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from mmitchel at gcc dot gnu dot org  2006-02-18 08:36 -------
Subject: Bug 26266

Author: mmitchel
Date: Sat Feb 18 08:36:11 2006
New Revision: 111229

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=111229
Log:
        PR c++/26266
        * cp-tree.h (cp_finish_decl): Adjust declaration.
        (grokbitfield): Likewise.
        (finish_static_data_member_decl): Likewise.
        * init.c (constant_value_1): Ensure processing_template_decl when
        folding non-dependent initializers for static data members of
        dependent types.  Return error_mark_node for erroneous
        initailizers.
        * class.c (get_vtable_decl): Use finish_decl, not cp_finish_decl.
        * decl.c (cp_make_fname_decl): Adjust call to cp_finish_decl.
        (cp_finish_decl): Add init_const_expr_p parameter.  Set
        DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P here.
        (finish_decl): Adjust call to cp_finish_decl.
        (compute_array_index_type): Robustify.
        (start_method): Use finish_decl, not cp_finish_decl.
        * rtti.c (emit_tinfo_decl): Likewise.
        * except.c (initialize_handler_parm): Adjust call to
        cp_finish_decl.
        (expand_start_catch_block): Likewise.
        * cvt.c (build_up_reference): Adjust call to cp_finish_decl.
        * pt.c (instantiate_class_template): Adjust call to
        finish_static_data_member_decl.
        (tsubst_expr): Use finish_decl, not cp_finish_decl.
        (instantiate_decl): Adjust call to cp_finish_decl.
        * name-lookup.c (pushdecl_top_level_1): Use finish_decl, not
        cp_finish_decl.
        * decl2.c (finish_static_data_member_decl): Add init_const_expr_p
        parameter.
        (grokfield): Likewise.
        * parser.c (cp_parser_condition): Check for constant initializers.
        (cp_parser_init_declarator): Adjust calls to grokfield and
        cp_finish_decl.  Don't set
        DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P here.
        (cp_parser_member_declaration): Likewise.
        (cp_parser_objc_class_ivars): Likewise.
        PR c++/26266
        * g++.dg/template/static22.C: New test.
        * g++.dg/template/static23.C: New test.
        * g++.dg/template/static24.C: New test.
        * g++.dg/template/non-dependent13.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/template/non-dependent13.C
    trunk/gcc/testsuite/g++.dg/template/static22.C
    trunk/gcc/testsuite/g++.dg/template/static23.C
    trunk/gcc/testsuite/g++.dg/template/static24.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/class.c
    trunk/gcc/cp/cp-tree.h
    trunk/gcc/cp/cvt.c
    trunk/gcc/cp/decl.c
    trunk/gcc/cp/decl2.c
    trunk/gcc/cp/except.c
    trunk/gcc/cp/init.c
    trunk/gcc/cp/name-lookup.c
    trunk/gcc/cp/parser.c
    trunk/gcc/cp/pt.c
    trunk/gcc/cp/rtti.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/26266] [4.0/4.1/4.2 regression] Trouble with static const data members in template classes
  2006-02-13 19:43 [Bug c++/26266] New: ICE igodard at pacbell dot net
                   ` (10 preceding siblings ...)
  2006-02-18  8:37 ` mmitchel at gcc dot gnu dot org
@ 2006-02-18  8:37 ` mmitchel at gcc dot gnu dot org
  2006-02-18  9:40 ` mmitchel at gcc dot gnu dot org
                   ` (14 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-02-18  8:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from mmitchel at gcc dot gnu dot org  2006-02-18 08:37 -------
Subject: Bug 26266

Author: mmitchel
Date: Sat Feb 18 08:37:34 2006
New Revision: 111231

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=111231
Log:
        PR c++/26266
        * cp-tree.h (cp_finish_decl): Adjust declaration.
        (grokbitfield): Likewise.
        (finish_static_data_member_decl): Likewise.
        * init.c (constant_value_1): Ensure processing_template_decl when
        folding non-dependent initializers for static data members of
        dependent types.  Return error_mark_node for erroneous
        initailizers.
        * class.c (get_vtable_decl): Use finish_decl, not cp_finish_decl.
        * decl.c (cp_make_fname_decl): Adjust call to cp_finish_decl.
        (cp_finish_decl): Add init_const_expr_p parameter.  Set
        DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P here.
        (finish_decl): Adjust call to cp_finish_decl.
        (compute_array_index_type): Robustify.
        (start_method): Use finish_decl, not cp_finish_decl.
        * rtti.c (emit_tinfo_decl): Likewise.
        * except.c (initialize_handler_parm): Adjust call to
        cp_finish_decl.
        (expand_start_catch_block): Likewise.
        * cvt.c (build_up_reference): Adjust call to cp_finish_decl.
        * pt.c (instantiate_class_template): Adjust call to
        finish_static_data_member_decl.
        (tsubst_expr): Use finish_decl, not cp_finish_decl.
        (instantiate_decl): Adjust call to cp_finish_decl.
        * name-lookup.c (pushdecl_top_level_1): Use finish_decl, not
        cp_finish_decl.
        * decl2.c (finish_static_data_member_decl): Add init_const_expr_p
        parameter.
        (grokfield): Likewise.
        * parser.c (cp_parser_condition): Check for constant initializers.
        (cp_parser_init_declarator): Adjust calls to grokfield and
        cp_finish_decl.  Don't set
        DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P here.
        (cp_parser_member_declaration): Likewise.
        (cp_parser_objc_class_ivars): Likewise.
        PR c++/26266
        * g++.dg/template/static22.C: New test.
        * g++.dg/template/static23.C: New test.
        * g++.dg/template/static24.C: New test.
        * g++.dg/template/non-dependent13.C: New test.

Added:
    branches/gcc-4_1-branch/gcc/testsuite/g++.dg/template/non-dependent13.C
    branches/gcc-4_1-branch/gcc/testsuite/g++.dg/template/static22.C
    branches/gcc-4_1-branch/gcc/testsuite/g++.dg/template/static23.C
    branches/gcc-4_1-branch/gcc/testsuite/g++.dg/template/static24.C
Modified:
    branches/gcc-4_1-branch/gcc/cp/class.c
    branches/gcc-4_1-branch/gcc/cp/cp-tree.h
    branches/gcc-4_1-branch/gcc/cp/cvt.c
    branches/gcc-4_1-branch/gcc/cp/decl.c
    branches/gcc-4_1-branch/gcc/cp/decl2.c
    branches/gcc-4_1-branch/gcc/cp/except.c
    branches/gcc-4_1-branch/gcc/cp/init.c
    branches/gcc-4_1-branch/gcc/cp/name-lookup.c
    branches/gcc-4_1-branch/gcc/cp/parser.c
    branches/gcc-4_1-branch/gcc/cp/pt.c
    branches/gcc-4_1-branch/gcc/cp/rtti.c
    branches/gcc-4_1-branch/gcc/testsuite/g++.dg/init/member1.C


-- 


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


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

* [Bug c++/26266] [4.0/4.1/4.2 regression] Trouble with static const data members in template classes
  2006-02-13 19:43 [Bug c++/26266] New: ICE igodard at pacbell dot net
                   ` (9 preceding siblings ...)
  2006-02-18  8:36 ` mmitchel at gcc dot gnu dot org
@ 2006-02-18  8:37 ` mmitchel at gcc dot gnu dot org
  2006-02-18  8:37 ` mmitchel at gcc dot gnu dot org
                   ` (15 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-02-18  8:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from mmitchel at gcc dot gnu dot org  2006-02-18 08:37 -------
Subject: Bug 26266

Author: mmitchel
Date: Sat Feb 18 08:37:11 2006
New Revision: 111230

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=111230
Log:
        PR c++/26266
        * g++.dg/template/static22.C: New test.
        * g++.dg/template/static23.C: New test.
        * g++.dg/template/static24.C: New test.
        * g++.dg/template/non-dependent13.C: New test.
        * g++.dg/init/member1.C: Tweak error markers.

Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/g++.dg/init/member1.C


-- 


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


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

* [Bug c++/26266] [4.0/4.1/4.2 regression] Trouble with static const data members in template classes
  2006-02-13 19:43 [Bug c++/26266] New: ICE igodard at pacbell dot net
                   ` (11 preceding siblings ...)
  2006-02-18  8:37 ` mmitchel at gcc dot gnu dot org
@ 2006-02-18  9:40 ` mmitchel at gcc dot gnu dot org
  2006-02-18  9:41 ` mmitchel at gcc dot gnu dot org
                   ` (13 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-02-18  9:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from mmitchel at gcc dot gnu dot org  2006-02-18 09:40 -------
Subject: Bug 26266

Author: mmitchel
Date: Sat Feb 18 09:40:03 2006
New Revision: 111233

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=111233
Log:
        PR c++/26266
        * cp-tree.h (cp_finish_decl): Adjust declaration.
        (grokbitfield): Likewise.
        (finish_static_data_member_decl): Likewise.
        * init.c (constant_value_1): Ensure processing_template_decl when
        folding non-dependent initializers for static data members of
        dependent types.  Return error_mark_node for erroneous
        initailizers.
        * class.c (get_vtable_decl): Use finish_decl, not cp_finish_decl.
        * decl.c (cp_make_fname_decl): Adjust call to cp_finish_decl.
        (cp_finish_decl): Add init_const_expr_p parameter.  Set
        DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P here.
        (finish_decl): Adjust call to cp_finish_decl.
        (compute_array_index_type): Robustify.
        (start_method): Use finish_decl, not cp_finish_decl.
        * rtti.c (emit_tinfo_decl): Likewise.
        * except.c (initialize_handler_parm): Adjust call to
        cp_finish_decl.
        (expand_start_catch_block): Likewise.
        * cvt.c (build_up_reference): Adjust call to cp_finish_decl.
        * pt.c (instantiate_class_template): Adjust call to
        finish_static_data_member_decl.
        (tsubst_expr): Use finish_decl, not cp_finish_decl.
        (instantiate_decl): Adjust call to cp_finish_decl.
        * name-lookup.c (pushdecl_top_level_1): Use finish_decl, not
        cp_finish_decl.
        * decl2.c (finish_static_data_member_decl): Add init_const_expr_p
        parameter.
        (grokfield): Likewise.
        * parser.c (cp_parser_condition): Check for constant initializers.
        (cp_parser_init_declarator): Adjust calls to grokfield and
        cp_finish_decl.  Don't set
        DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P here.
        (cp_parser_member_declaration): Likewise.
        (cp_parser_objc_class_ivars): Likewise.

        PR c++/26266
        * g++.dg/template/static22.C: New test.
        * g++.dg/template/static23.C: New test.
        * g++.dg/template/static24.C: New test.
        * g++.dg/template/non-dependent13.C: New test.

Modified:
    branches/gcc-4_1-branch/gcc/cp/ChangeLog
    branches/gcc-4_1-branch/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/26266] [4.0/4.1/4.2 regression] Trouble with static const data members in template classes
  2006-02-13 19:43 [Bug c++/26266] New: ICE igodard at pacbell dot net
                   ` (13 preceding siblings ...)
  2006-02-18  9:41 ` mmitchel at gcc dot gnu dot org
@ 2006-02-18  9:41 ` mmitchel at gcc dot gnu dot org
  2006-02-24  0:31 ` mmitchel at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-02-18  9:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #15 from mmitchel at gcc dot gnu dot org  2006-02-18 09:41 -------
Only the accepts-invalid in Comment #7 remains.


-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|ice-on-valid-code, rejects- |
                   |valid                       |
           Priority|P1                          |P2


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


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

* [Bug c++/26266] [4.0/4.1/4.2 regression] Trouble with static const data members in template classes
  2006-02-13 19:43 [Bug c++/26266] New: ICE igodard at pacbell dot net
                   ` (12 preceding siblings ...)
  2006-02-18  9:40 ` mmitchel at gcc dot gnu dot org
@ 2006-02-18  9:41 ` mmitchel at gcc dot gnu dot org
  2006-02-18  9:41 ` mmitchel at gcc dot gnu dot org
                   ` (12 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-02-18  9:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #14 from mmitchel at gcc dot gnu dot org  2006-02-18 09:41 -------
Subject: Bug 26266

Author: mmitchel
Date: Sat Feb 18 09:41:18 2006
New Revision: 111234

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=111234
Log:
        PR c++/26266
        * cp-tree.h (cp_finish_decl): Adjust declaration.
        (grokbitfield): Likewise.
        (finish_static_data_member_decl): Likewise.
        * init.c (constant_value_1): Ensure processing_template_decl when
        folding non-dependent initializers for static data members of
        dependent types.  Return error_mark_node for erroneous
        initailizers.
        * class.c (get_vtable_decl): Use finish_decl, not cp_finish_decl.
        * decl.c (cp_make_fname_decl): Adjust call to cp_finish_decl.
        (cp_finish_decl): Add init_const_expr_p parameter.  Set
        DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P here.
        (finish_decl): Adjust call to cp_finish_decl.
        (compute_array_index_type): Robustify.
        (start_method): Use finish_decl, not cp_finish_decl.
        * rtti.c (emit_tinfo_decl): Likewise.
        * except.c (initialize_handler_parm): Adjust call to
        cp_finish_decl.
        (expand_start_catch_block): Likewise.
        * cvt.c (build_up_reference): Adjust call to cp_finish_decl.
        * pt.c (instantiate_class_template): Adjust call to
        finish_static_data_member_decl.
        (tsubst_expr): Use finish_decl, not cp_finish_decl.
        (instantiate_decl): Adjust call to cp_finish_decl.
        * name-lookup.c (pushdecl_top_level_1): Use finish_decl, not
        cp_finish_decl.
        * decl2.c (finish_static_data_member_decl): Add init_const_expr_p
        parameter.
        (grokfield): Likewise.
        * parser.c (cp_parser_condition): Check for constant initializers.
        (cp_parser_init_declarator): Adjust calls to grokfield and
        cp_finish_decl.  Don't set
        DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P here.
        (cp_parser_member_declaration): Likewise.
        (cp_parser_objc_class_ivars): Likewise.
        PR c++/26266
        * g++.dg/template/static22.C: New test.
        * g++.dg/template/static23.C: New test.
        * g++.dg/template/static24.C: New test.
        * g++.dg/template/non-dependent13.C: New test.

Added:
    branches/gcc-4_0-branch/gcc/testsuite/g++.dg/template/non-dependent13.C
    branches/gcc-4_0-branch/gcc/testsuite/g++.dg/template/static22.C
    branches/gcc-4_0-branch/gcc/testsuite/g++.dg/template/static23.C
    branches/gcc-4_0-branch/gcc/testsuite/g++.dg/template/static24.C
Modified:
    branches/gcc-4_0-branch/gcc/cp/ChangeLog
    branches/gcc-4_0-branch/gcc/cp/class.c
    branches/gcc-4_0-branch/gcc/cp/cp-tree.h
    branches/gcc-4_0-branch/gcc/cp/cvt.c
    branches/gcc-4_0-branch/gcc/cp/decl.c
    branches/gcc-4_0-branch/gcc/cp/decl2.c
    branches/gcc-4_0-branch/gcc/cp/except.c
    branches/gcc-4_0-branch/gcc/cp/init.c
    branches/gcc-4_0-branch/gcc/cp/name-lookup.c
    branches/gcc-4_0-branch/gcc/cp/parser.c
    branches/gcc-4_0-branch/gcc/cp/pt.c
    branches/gcc-4_0-branch/gcc/cp/rtti.c
    branches/gcc-4_0-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_0-branch/gcc/testsuite/g++.dg/init/member1.C


-- 


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


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

* [Bug c++/26266] [4.0/4.1/4.2 regression] Trouble with static const data members in template classes
  2006-02-13 19:43 [Bug c++/26266] New: ICE igodard at pacbell dot net
                   ` (14 preceding siblings ...)
  2006-02-18  9:41 ` mmitchel at gcc dot gnu dot org
@ 2006-02-24  0:31 ` mmitchel at gcc dot gnu dot org
  2006-04-12  3:06 ` mmitchel at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-02-24  0:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #16 from mmitchel at gcc dot gnu dot org  2006-02-24 00:26 -------
This issue will not be resolved in GCC 4.1.0; retargeted at GCC 4.1.1.


-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.0.3                       |4.1.1


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


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

* [Bug c++/26266] [4.0/4.1/4.2 regression] Trouble with static const data members in template classes
  2006-02-13 19:43 [Bug c++/26266] New: ICE igodard at pacbell dot net
                   ` (15 preceding siblings ...)
  2006-02-24  0:31 ` mmitchel at gcc dot gnu dot org
@ 2006-04-12  3:06 ` mmitchel at gcc dot gnu dot org
  2006-05-25  2:37 ` mmitchel at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-04-12  3:06 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #17 from mmitchel at gcc dot gnu dot org  2006-04-12 03:06 -------
The fix for the bug in Comment #7 is to implement DR224.  

The problem here is that we think that A is a dependent type; as such, it might
be  int, and the initialization would be valid.  However, A is non-dependent
according to DR224.  If we recognized that, we would correctly issue an error.

However, implementing DR224 is not trivial.  Making types that involve template
parameters non-dependent is likely to trigger problems throughout the front end
in routines that are using "dependent" as a synonym for "uses template
parameters".


-- 


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


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

* [Bug c++/26266] [4.0/4.1/4.2 regression] Trouble with static const data members in template classes
  2006-02-13 19:43 [Bug c++/26266] New: ICE igodard at pacbell dot net
                   ` (16 preceding siblings ...)
  2006-04-12  3:06 ` mmitchel at gcc dot gnu dot org
@ 2006-05-25  2:37 ` mmitchel at gcc dot gnu dot org
  2007-02-14  9:14 ` [Bug c++/26266] [4.0/4.1/4.2/4.3 " mmitchel at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-05-25  2:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #18 from mmitchel at gcc dot gnu dot org  2006-05-25 02:33 -------
Will not be fixed in 4.1.1; adjust target milestone to 4.1.2.


-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.1.1                       |4.1.2


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


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

* [Bug c++/26266] [4.0/4.1/4.2/4.3 regression] Trouble with static const data members in template classes
  2006-02-13 19:43 [Bug c++/26266] New: ICE igodard at pacbell dot net
                   ` (17 preceding siblings ...)
  2006-05-25  2:37 ` mmitchel at gcc dot gnu dot org
@ 2007-02-14  9:14 ` mmitchel at gcc dot gnu dot org
  2007-12-16 23:18 ` steven at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-02-14  9:14 UTC (permalink / raw)
  To: gcc-bugs



-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.1.2                       |4.1.3


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


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

* [Bug c++/26266] [4.0/4.1/4.2/4.3 regression] Trouble with static const data members in template classes
  2006-02-13 19:43 [Bug c++/26266] New: ICE igodard at pacbell dot net
                   ` (18 preceding siblings ...)
  2007-02-14  9:14 ` [Bug c++/26266] [4.0/4.1/4.2/4.3 " mmitchel at gcc dot gnu dot org
@ 2007-12-16 23:18 ` steven at gcc dot gnu dot org
  2007-12-18  5:34 ` mmitchel at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: steven at gcc dot gnu dot org @ 2007-12-16 23:18 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #19 from steven at gcc dot gnu dot org  2007-12-16 23:18 -------
Open regression with no activity since February 14.  Ping?


-- 


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


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

* [Bug c++/26266] [4.0/4.1/4.2/4.3 regression] Trouble with static const data members in template classes
  2006-02-13 19:43 [Bug c++/26266] New: ICE igodard at pacbell dot net
                   ` (19 preceding siblings ...)
  2007-12-16 23:18 ` steven at gcc dot gnu dot org
@ 2007-12-18  5:34 ` mmitchel at gcc dot gnu dot org
  2008-02-27 16:53 ` [Bug c++/26266] [4.0/4.1/4.2/4.3/4.4 " bangerth at dealii dot org
                   ` (5 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-12-18  5:34 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #20 from mmitchel at gcc dot gnu dot org  2007-12-18 05:34 -------
I think Comment #17 still applies.  This is indeed an accepts-invalid
regression, but it has no easy fix.


-- 


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


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

* [Bug c++/26266] [4.0/4.1/4.2/4.3/4.4 regression] Trouble with static const data members in template classes
  2006-02-13 19:43 [Bug c++/26266] New: ICE igodard at pacbell dot net
                   ` (20 preceding siblings ...)
  2007-12-18  5:34 ` mmitchel at gcc dot gnu dot org
@ 2008-02-27 16:53 ` bangerth at dealii dot org
  2008-07-04 20:21 ` [Bug c++/26266] [4.2/4.3/4.4 " jsm28 at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: bangerth at dealii dot org @ 2008-02-27 16:53 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #21 from bangerth at dealii dot org  2008-02-27 16:52 -------
Can someone check which of the testcases now work and separate
those that don't into PRs of their own? This PR has become
a bit confusing.

W.


-- 

bangerth at dealii dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bangerth at dealii dot org


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


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

* [Bug c++/26266] [4.2/4.3/4.4 regression] Trouble with static const data members in template classes
  2006-02-13 19:43 [Bug c++/26266] New: ICE igodard at pacbell dot net
                   ` (21 preceding siblings ...)
  2008-02-27 16:53 ` [Bug c++/26266] [4.0/4.1/4.2/4.3/4.4 " bangerth at dealii dot org
@ 2008-07-04 20:21 ` jsm28 at gcc dot gnu dot org
  2009-02-21 22:17 ` steven at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2008-07-04 20:21 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #22 from jsm28 at gcc dot gnu dot org  2008-07-04 20:20 -------
Closing 4.1 branch.  (It would still be useful for someone to split this bug up
as suggested in the last comment.)


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.1/4.2/4.3/4.4 regression]|[4.2/4.3/4.4 regression]
                   |Trouble with static const   |Trouble with static const
                   |data members in template    |data members in template
                   |classes                     |classes
   Target Milestone|4.1.3                       |4.2.5


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


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

* [Bug c++/26266] [4.2/4.3/4.4 regression] Trouble with static const data members in template classes
  2006-02-13 19:43 [Bug c++/26266] New: ICE igodard at pacbell dot net
                   ` (22 preceding siblings ...)
  2008-07-04 20:21 ` [Bug c++/26266] [4.2/4.3/4.4 " jsm28 at gcc dot gnu dot org
@ 2009-02-21 22:17 ` steven at gcc dot gnu dot org
  2009-02-21 22:27 ` mmitchel at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: steven at gcc dot gnu dot org @ 2009-02-21 22:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #23 from steven at gcc dot gnu dot org  2009-02-21 22:17 -------
What is the "Assigned:" field worth if nothing happens for 3 years?

How about just moving this one to SUSPENDED?


-- 


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


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

* [Bug c++/26266] [4.2/4.3/4.4 regression] Trouble with static const data members in template classes
  2006-02-13 19:43 [Bug c++/26266] New: ICE igodard at pacbell dot net
                   ` (23 preceding siblings ...)
  2009-02-21 22:17 ` steven at gcc dot gnu dot org
@ 2009-02-21 22:27 ` mmitchel at gcc dot gnu dot org
  2009-03-20 18:11 ` jason at gcc dot gnu dot org
  2009-03-20 20:16 ` mark at codesourcery dot com
  26 siblings, 0 replies; 28+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2009-02-21 22:27 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #24 from mmitchel at gcc dot gnu dot org  2009-02-21 22:26 -------
The problem isn't the database schema; it's keeping it up to date.

I'm not actively working on this issue any more, so I've unassigned myself.


-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|mark at codesourcery dot com|unassigned at gcc dot gnu
                   |                            |dot org
             Status|ASSIGNED                    |NEW


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


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

* [Bug c++/26266] [4.2/4.3/4.4 regression] Trouble with static const data members in template classes
  2006-02-13 19:43 [Bug c++/26266] New: ICE igodard at pacbell dot net
                   ` (24 preceding siblings ...)
  2009-02-21 22:27 ` mmitchel at gcc dot gnu dot org
@ 2009-03-20 18:11 ` jason at gcc dot gnu dot org
  2009-03-20 20:16 ` mark at codesourcery dot com
  26 siblings, 0 replies; 28+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-03-20 18:11 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #25 from jason at gcc dot gnu dot org  2009-03-20 18:11 -------
I don't think the testcase in comment #7 indicates a bug at all.  We don't
issue an error because we don't instantiate A<0>::i.  14.6 says:

If no valid specialization can be generated for a template definition, and that
template is not instantiated, the template definition is ill-formed, no
diagnostic required. If a type used in a non-dependent name is incomplete at
the point at which a template is defined but is complete at the point at which
an instantiation is done, and if the completeness of that type affects whether
or not the program is well-formed or affects the semantics of the program, the
program is ill-formed; no diagnostic is required.

So no diagnostic is required.  If we change the last line to

int i = A<0>::i;

we do instantiate A<0>::i, and we give the diagnostic.


-- 

jason at gcc dot gnu dot org changed:

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


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


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

* [Bug c++/26266] [4.2/4.3/4.4 regression] Trouble with static const data members in template classes
  2006-02-13 19:43 [Bug c++/26266] New: ICE igodard at pacbell dot net
                   ` (25 preceding siblings ...)
  2009-03-20 18:11 ` jason at gcc dot gnu dot org
@ 2009-03-20 20:16 ` mark at codesourcery dot com
  26 siblings, 0 replies; 28+ messages in thread
From: mark at codesourcery dot com @ 2009-03-20 20:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #26 from mark at codesourcery dot com  2009-03-20 20:16 -------
Subject: Re:  [4.2/4.3/4.4 regression] Trouble with static
 const data members in template classes

jason at gcc dot gnu dot org wrote:

> I don't think the testcase in comment #7 indicates a bug at all.

FWIW, I concur with your analysis.

Thanks,


-- 


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


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

end of thread, other threads:[~2009-03-20 20:16 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-13 19:43 [Bug c++/26266] New: ICE igodard at pacbell dot net
2006-02-13 19:44 ` [Bug c++/26266] ICE igodard at pacbell dot net
2006-02-13 19:44 ` igodard at pacbell dot net
2006-02-13 20:25 ` pinskia at gcc dot gnu dot org
2006-02-13 20:29 ` pinskia at gcc dot gnu dot org
2006-02-14 17:13 ` [Bug c++/26266] [4.0/4.1/4.2 regression] Trouble with static const data members in template classes reichelt at gcc dot gnu dot org
2006-02-14 19:26 ` mark at codesourcery dot com
2006-02-14 20:38 ` reichelt at gcc dot gnu dot org
2006-02-14 20:40 ` igodard at pacbell dot net
2006-02-18  6:49 ` mmitchel at gcc dot gnu dot org
2006-02-18  8:36 ` mmitchel at gcc dot gnu dot org
2006-02-18  8:37 ` mmitchel at gcc dot gnu dot org
2006-02-18  8:37 ` mmitchel at gcc dot gnu dot org
2006-02-18  9:40 ` mmitchel at gcc dot gnu dot org
2006-02-18  9:41 ` mmitchel at gcc dot gnu dot org
2006-02-18  9:41 ` mmitchel at gcc dot gnu dot org
2006-02-24  0:31 ` mmitchel at gcc dot gnu dot org
2006-04-12  3:06 ` mmitchel at gcc dot gnu dot org
2006-05-25  2:37 ` mmitchel at gcc dot gnu dot org
2007-02-14  9:14 ` [Bug c++/26266] [4.0/4.1/4.2/4.3 " mmitchel at gcc dot gnu dot org
2007-12-16 23:18 ` steven at gcc dot gnu dot org
2007-12-18  5:34 ` mmitchel at gcc dot gnu dot org
2008-02-27 16:53 ` [Bug c++/26266] [4.0/4.1/4.2/4.3/4.4 " bangerth at dealii dot org
2008-07-04 20:21 ` [Bug c++/26266] [4.2/4.3/4.4 " jsm28 at gcc dot gnu dot org
2009-02-21 22:17 ` steven at gcc dot gnu dot org
2009-02-21 22:27 ` mmitchel at gcc dot gnu dot org
2009-03-20 18:11 ` jason at gcc dot gnu dot org
2009-03-20 20:16 ` mark at codesourcery dot com

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).