public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/19826] New: More array bounds rejected as non-constant in template...
@ 2005-02-09 0:51 pcarlini at suse dot de
2005-02-09 1:22 ` [Bug c++/19826] " reichelt at gcc dot gnu dot org
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: pcarlini at suse dot de @ 2005-02-09 0:51 UTC (permalink / raw)
To: gcc-bugs
This one *may* be related to c++/18470 but does *not* involve using... FWIW,
Icc accepts it, same for 3.4.3. Maybe a regression, fall out of recent work
in close areas... ?!?
template<typename _Alloc>
class basic_string
{
typedef typename _Alloc::size_type size_type;
static const size_type _S_max_local = 16;
char _M_data[_S_max_local];
};
--
Summary: More array bounds rejected as non-constant in
template...
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pcarlini at suse dot de
CC: gcc-bugs at gcc dot gnu dot org,mmitchel at gcc dot gnu
dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19826
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/19826] More array bounds rejected as non-constant in template...
2005-02-09 0:51 [Bug c++/19826] New: More array bounds rejected as non-constant in template pcarlini at suse dot de
@ 2005-02-09 1:22 ` reichelt at gcc dot gnu dot org
2005-02-09 1:44 ` [Bug c++/19826] [4.0 Regression] " pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2005-02-09 1:22 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From reichelt at gcc dot gnu dot org 2005-02-08 16:56 -------
Even shorter example:
================================
template<typename T> struct A
{
static const T i = 1;
char a[i];
};
================================
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |reichelt at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19826
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/19826] [4.0 Regression] More array bounds rejected as non-constant in template...
2005-02-09 0:51 [Bug c++/19826] New: More array bounds rejected as non-constant in template pcarlini at suse dot de
2005-02-09 1:22 ` [Bug c++/19826] " reichelt at gcc dot gnu dot org
@ 2005-02-09 1:44 ` pinskia at gcc dot gnu dot org
2005-02-09 2:21 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-09 1:44 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-02-08 17:09 -------
This is at least a 4.0 regression and it looks like it is going to effect libstdc++ also which is really bad.
--
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |critical
Keywords| |rejects-valid
Priority|P2 |P1
Summary|More array bounds rejected |[4.0 Regression] More array
|as non-constant in |bounds rejected as non-
|template... |constant in template...
Target Milestone|--- |4.0.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19826
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/19826] [4.0 Regression] More array bounds rejected as non-constant in template...
2005-02-09 0:51 [Bug c++/19826] New: More array bounds rejected as non-constant in template pcarlini at suse dot de
2005-02-09 1:22 ` [Bug c++/19826] " reichelt at gcc dot gnu dot org
2005-02-09 1:44 ` [Bug c++/19826] [4.0 Regression] " pinskia at gcc dot gnu dot org
@ 2005-02-09 2:21 ` pinskia at gcc dot gnu dot org
2005-02-09 6:24 ` pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-09 2:21 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-02-08 17:10 -------
Confirmed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2005-02-08 17:10:11
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19826
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/19826] [4.0 Regression] More array bounds rejected as non-constant in template...
2005-02-09 0:51 [Bug c++/19826] New: More array bounds rejected as non-constant in template pcarlini at suse dot de
` (2 preceding siblings ...)
2005-02-09 2:21 ` pinskia at gcc dot gnu dot org
@ 2005-02-09 6:24 ` pinskia at gcc dot gnu dot org
2005-02-09 6:38 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-09 6:24 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-02-08 19:21 -------
: Search converges between 2004-11-12-161002-trunk (#631) and 2004-11-13-014001-trunk
(#632).
Mark, I suspect your patch for PR 18429 is responsible for the regression.
Could you please have a look?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19826
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/19826] [4.0 Regression] More array bounds rejected as non-constant in template...
2005-02-09 0:51 [Bug c++/19826] New: More array bounds rejected as non-constant in template pcarlini at suse dot de
` (3 preceding siblings ...)
2005-02-09 6:24 ` pinskia at gcc dot gnu dot org
@ 2005-02-09 6:38 ` pinskia at gcc dot gnu dot org
2005-02-09 9:38 ` mmitchel at gcc dot gnu dot org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-09 6:38 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-02-08 19:50 -------
Is the problem here (in sematics.c):
/* Since this name was dependent, the expression isn't
constant -- yet. No error is issued because it might be
constant when things are instantiated. */
if (integral_constant_expression_p)
*non_integral_constant_expression_p = true;
Can someone help me if this really should be false because that fixes both this bug and PR 18470.
With that change we still reject the following testcase:
template<typename T> struct A
{
static const T i = 1;
char a[i];
};
A<float> a;
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19826
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/19826] [4.0 Regression] More array bounds rejected as non-constant in template...
2005-02-09 0:51 [Bug c++/19826] New: More array bounds rejected as non-constant in template pcarlini at suse dot de
` (4 preceding siblings ...)
2005-02-09 6:38 ` pinskia at gcc dot gnu dot org
@ 2005-02-09 9:38 ` mmitchel at gcc dot gnu dot org
2005-02-10 8:13 ` cvs-commit at gcc dot gnu dot org
2005-02-10 9:40 ` mmitchel at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-02-09 9:38 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2005-02-09 03:09 -------
Yeah, this is me being an idiot. Will fix.
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |mark at codesourcery dot com
|dot org |
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19826
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/19826] [4.0 Regression] More array bounds rejected as non-constant in template...
2005-02-09 0:51 [Bug c++/19826] New: More array bounds rejected as non-constant in template pcarlini at suse dot de
` (5 preceding siblings ...)
2005-02-09 9:38 ` mmitchel at gcc dot gnu dot org
@ 2005-02-10 8:13 ` cvs-commit at gcc dot gnu dot org
2005-02-10 9:40 ` mmitchel at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-02-10 8:13 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-02-10 00:35 -------
Subject: Bug 19826
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: mmitchel@gcc.gnu.org 2005-02-10 00:34:47
Modified files:
gcc/cp : ChangeLog call.c decl.c parser.c
gcc/testsuite : ChangeLog
gcc/testsuite/g++.dg/template: crash2.C
Added files:
gcc/testsuite/g++.dg/conversion: ambig1.C
gcc/testsuite/g++.dg/ext: attrib19.C
gcc/testsuite/g++.dg/parse: dtor5.C
gcc/testsuite/g++.dg/template: dtor3.C static11.C
Log message:
PR c++/19787
* call.c (initialize_reference): Robustify.
PR ++/19732
* decl.c (grokdeclarator): Check for invalid use of destructor
names.
PR c++/19762
* parser.c (cp_parser_unqualified_id): Avoid creating destructor
names with invalid types.
PR c++/19826
* parser.c (cp_parser_direct_declarator): Allow type-dependent
expressions as array bounds.
PR c++/19739
* parser.c (cp_parser_attributes_list): Allow empty lists.
PR c++/19787
* g++.dg/conversion/ambig1.C: New test.
PR c++/19739
* g++.dg/ext/attrib19.C: New test.
PR c++/19732
* g++.dg/parse/dtor5.C: New test.
PR c++/19762
* g++.dg/template/dtor3.C: New test.
PR c++/19826
* g++.dg/template/static11.C: New test.
* g++.dg/template/crash2.C: Remove dg-error marker.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4618&r2=1.4619
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/call.c.diff?cvsroot=gcc&r1=1.528&r2=1.529
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl.c.diff?cvsroot=gcc&r1=1.1360&r2=1.1361
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&r1=1.313&r2=1.314
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5011&r2=1.5012
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/conversion/ambig1.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/attrib19.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/dtor5.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/dtor3.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/static11.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/crash2.C.diff?cvsroot=gcc&r1=1.3&r2=1.4
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19826
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/19826] [4.0 Regression] More array bounds rejected as non-constant in template...
2005-02-09 0:51 [Bug c++/19826] New: More array bounds rejected as non-constant in template pcarlini at suse dot de
` (6 preceding siblings ...)
2005-02-10 8:13 ` cvs-commit at gcc dot gnu dot org
@ 2005-02-10 9:40 ` mmitchel at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-02-10 9:40 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2005-02-10 00:44 -------
Fixed in 4.0.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19826
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2005-02-10 0:44 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-09 0:51 [Bug c++/19826] New: More array bounds rejected as non-constant in template pcarlini at suse dot de
2005-02-09 1:22 ` [Bug c++/19826] " reichelt at gcc dot gnu dot org
2005-02-09 1:44 ` [Bug c++/19826] [4.0 Regression] " pinskia at gcc dot gnu dot org
2005-02-09 2:21 ` pinskia at gcc dot gnu dot org
2005-02-09 6:24 ` pinskia at gcc dot gnu dot org
2005-02-09 6:38 ` pinskia at gcc dot gnu dot org
2005-02-09 9:38 ` mmitchel at gcc dot gnu dot org
2005-02-10 8:13 ` cvs-commit at gcc dot gnu dot org
2005-02-10 9:40 ` 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).