public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/16489] New: G++ incorrectly rejects use of a null constant integral expression as a null constant pointer
@ 2004-07-12 7:23 gdr at gcc dot gnu dot org
2004-07-12 7:32 ` [Bug c++/16489] [3.3/3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: gdr at gcc dot gnu dot org @ 2004-07-12 7:23 UTC (permalink / raw)
To: gcc-bugs
Consider
const int NULL = 0;
int main() { double* p = NULL; }
G++ incorrectly rejects the above. This regression is also present
in GCC-3.3.x, in direct violation of the C++ standard.
--
Summary: G++ incorrectly rejects use of a null constant integral
expression as a null constant pointer
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: gdr at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC host triplet: Plateform independent
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16489
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/16489] [3.3/3.4/3.5 Regression] G++ incorrectly rejects use of a null constant integral expression as a null constant pointer
2004-07-12 7:23 [Bug c++/16489] New: G++ incorrectly rejects use of a null constant integral expression as a null constant pointer gdr at gcc dot gnu dot org
@ 2004-07-12 7:32 ` pinskia at gcc dot gnu dot org
2004-07-12 14:06 ` pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-12 7:32 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-07-12 07:32 -------
Confirmed. Phil's regression hunter <http://www.devphil.com/~reghunt/> is down during the early
EST morning hours :(.
--
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |critical
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |rejects-valid
Known to fail| |3.2.3 3.2.2 3.3.3 3.5.0
| |3.4.0
Known to work| |3.0.4
Last reconfirmed|0000-00-00 00:00:00 |2004-07-12 07:32:04
date| |
Summary|G++ incorrectly rejects use |[3.3/3.4/3.5 Regression] G++
|of a null constant integral |incorrectly rejects use of a
|expression as a null |null constant integral
|constant pointer |expression as a null
| |constant pointer
Target Milestone|--- |3.4.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16489
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/16489] [3.3/3.4/3.5 Regression] G++ incorrectly rejects use of a null constant integral expression as a null constant pointer
2004-07-12 7:23 [Bug c++/16489] New: G++ incorrectly rejects use of a null constant integral expression as a null constant pointer gdr at gcc dot gnu dot org
2004-07-12 7:32 ` [Bug c++/16489] [3.3/3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
@ 2004-07-12 14:06 ` pinskia at gcc dot gnu dot org
2004-07-26 14:46 ` 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 @ 2004-07-12 14:06 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-07-12 14:06 -------
Here is the result from Phil's regression hunter: Search converges between 2002-11-30-trunk (#150)
and 2002-12-02-trunk (#151).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16489
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/16489] [3.3/3.4/3.5 Regression] G++ incorrectly rejects use of a null constant integral expression as a null constant pointer
2004-07-12 7:23 [Bug c++/16489] New: G++ incorrectly rejects use of a null constant integral expression as a null constant pointer gdr at gcc dot gnu dot org
2004-07-12 7:32 ` [Bug c++/16489] [3.3/3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
2004-07-12 14:06 ` pinskia at gcc dot gnu dot org
@ 2004-07-26 14:46 ` pinskia at gcc dot gnu dot org
2004-07-27 10:57 ` gdr at integrable-solutions dot net
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-26 14:46 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-07-26 14:46 -------
Note unlike most other constant integral expression 0 is special IIRC.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16489
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/16489] [3.3/3.4/3.5 Regression] G++ incorrectly rejects use of a null constant integral expression as a null constant pointer
2004-07-12 7:23 [Bug c++/16489] New: G++ incorrectly rejects use of a null constant integral expression as a null constant pointer gdr at gcc dot gnu dot org
` (2 preceding siblings ...)
2004-07-26 14:46 ` pinskia at gcc dot gnu dot org
@ 2004-07-27 10:57 ` gdr at integrable-solutions dot net
2004-08-01 21:24 ` mmitchel at gcc dot gnu dot org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: gdr at integrable-solutions dot net @ 2004-07-27 10:57 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From gdr at integrable-solutions dot net 2004-07-27 10:57 -------
Subject: Re: [3.3/3.4/3.5 Regression] G++ incorrectly rejects use of a null constant integral expression as a null constant pointer
"pinskia at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> writes:
| Note unlike most other constant integral expression 0 is special IIRC.
I do not understand what you meant to imply...
-- Gaby
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16489
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/16489] [3.3/3.4/3.5 Regression] G++ incorrectly rejects use of a null constant integral expression as a null constant pointer
2004-07-12 7:23 [Bug c++/16489] New: G++ incorrectly rejects use of a null constant integral expression as a null constant pointer gdr at gcc dot gnu dot org
` (3 preceding siblings ...)
2004-07-27 10:57 ` gdr at integrable-solutions dot net
@ 2004-08-01 21:24 ` mmitchel at gcc dot gnu dot org
2004-08-02 1:56 ` cvs-commit at gcc dot gnu dot org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-08-01 21:24 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2004-08-01 21:24 -------
Working on a 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=16489
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/16489] [3.3/3.4/3.5 Regression] G++ incorrectly rejects use of a null constant integral expression as a null constant pointer
2004-07-12 7:23 [Bug c++/16489] New: G++ incorrectly rejects use of a null constant integral expression as a null constant pointer gdr at gcc dot gnu dot org
` (4 preceding siblings ...)
2004-08-01 21:24 ` mmitchel at gcc dot gnu dot org
@ 2004-08-02 1:56 ` cvs-commit at gcc dot gnu dot org
2004-08-02 1:58 ` cvs-commit at gcc dot gnu dot org
2004-08-02 2:01 ` mmitchel at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-08-02 1:56 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-08-02 01:56 -------
Subject: Bug 16489
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-3_4-branch
Changes by: mmitchel@gcc.gnu.org 2004-08-02 01:56:33
Modified files:
gcc/cp : ChangeLog call.c cp-tree.h decl.c pt.c
semantics.c typeck.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/g++.dg/inherit: ptrmem2.C
gcc/testsuite/g++.dg/init: null1.C
gcc/testsuite/g++.dg/parse: namespace10.C
Log message:
PR c++/16338
* cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): New macro.
* call.c (null_ptr_cst_p): Handle variables with constant
initializers.
* pt.c (convert_nontype_argument): Use
DECL_INTEGRAL_CONSTANT_VAR_P.
* semantics.c (finish_id_expression): Likewise.
PR c++~/16489
* decl.c (duplicate_decls): Reject duplicate namespace
declarations.
PR c++/16810
* typeck.c (build_ptrmemfunc): Loosen assertion.
PR c++/16338
* g++.dg/init/null1.C: New test.
* g++.dg/tc1/dr76.C: Adjust error marker.
PR c++/16489
* g++.dg/parse/namespace10.C: New test.
PR c++/16810
* g++.dg/inherit/ptrmem2.C: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3892.2.136&r2=1.3892.2.137
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/call.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.452.2.19&r2=1.452.2.20
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/cp-tree.h.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.946.4.14&r2=1.946.4.15
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.1174.2.21&r2=1.1174.2.22
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/pt.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.816.2.34&r2=1.816.2.35
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/semantics.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.381.4.11&r2=1.381.4.12
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/typeck.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.519.2.21&r2=1.519.2.22
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3389.2.238&r2=1.3389.2.239
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/inherit/ptrmem2.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/init/null1.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/namespace10.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16489
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/16489] [3.3/3.4/3.5 Regression] G++ incorrectly rejects use of a null constant integral expression as a null constant pointer
2004-07-12 7:23 [Bug c++/16489] New: G++ incorrectly rejects use of a null constant integral expression as a null constant pointer gdr at gcc dot gnu dot org
` (5 preceding siblings ...)
2004-08-02 1:56 ` cvs-commit at gcc dot gnu dot org
@ 2004-08-02 1:58 ` cvs-commit at gcc dot gnu dot org
2004-08-02 2:01 ` mmitchel at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-08-02 1:58 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-08-02 01:58 -------
Subject: Bug 16489
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: mmitchel@gcc.gnu.org 2004-08-02 01:58:52
Modified files:
gcc/cp : ChangeLog call.c cp-tree.h decl.c pt.c
semantics.c typeck.c
gcc/testsuite : ChangeLog
gcc/testsuite/g++.dg/tc1: dr76.C
Added files:
gcc/testsuite/g++.dg/inherit: ptrmem2.C
gcc/testsuite/g++.dg/init: null1.C
gcc/testsuite/g++.dg/parse: namespace10.C
Log message:
PR c++/16338
* cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): New macro.
* call.c (null_ptr_cst_p): Handle variables with constant
initializers.
* pt.c (convert_nontype_argument): Use
DECL_INTEGRAL_CONSTANT_VAR_P.
* semantics.c (finish_id_expression): Likewise.
PR c++~/16489
* decl.c (duplicate_decls): Reject duplicate namespace
declarations.
PR c++/16810
* typeck.c (build_ptrmemfunc): Loosen assertion.
PR c++/16338
* g++.dg/init/null1.C: New test.
* g++.dg/tc1/dr76.C: Adjust error marker.
PR c++/16489
* g++.dg/parse/namespace10.C: New test.
PR c++/16810
* g++.dg/inherit/ptrmem2.C: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4254&r2=1.4255
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/call.c.diff?cvsroot=gcc&r1=1.496&r2=1.497
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/cp-tree.h.diff?cvsroot=gcc&r1=1.1026&r2=1.1027
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl.c.diff?cvsroot=gcc&r1=1.1265&r2=1.1266
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/pt.c.diff?cvsroot=gcc&r1=1.898&r2=1.899
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/semantics.c.diff?cvsroot=gcc&r1=1.420&r2=1.421
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/typeck.c.diff?cvsroot=gcc&r1=1.565&r2=1.566
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4079&r2=1.4080
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/inherit/ptrmem2.C.diff?cvsroot=gcc&r1=1.1&r2=1.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/init/null1.C.diff?cvsroot=gcc&r1=1.1&r2=1.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/namespace10.C.diff?cvsroot=gcc&r1=1.1&r2=1.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/tc1/dr76.C.diff?cvsroot=gcc&r1=1.2&r2=1.3
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16489
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/16489] [3.3/3.4/3.5 Regression] G++ incorrectly rejects use of a null constant integral expression as a null constant pointer
2004-07-12 7:23 [Bug c++/16489] New: G++ incorrectly rejects use of a null constant integral expression as a null constant pointer gdr at gcc dot gnu dot org
` (6 preceding siblings ...)
2004-08-02 1:58 ` cvs-commit at gcc dot gnu dot org
@ 2004-08-02 2:01 ` mmitchel at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-08-02 2:01 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2004-08-02 02:01 -------
Fixed in GCC 3.4.2 and GCC 3.5.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16489
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2004-08-02 2:01 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-12 7:23 [Bug c++/16489] New: G++ incorrectly rejects use of a null constant integral expression as a null constant pointer gdr at gcc dot gnu dot org
2004-07-12 7:32 ` [Bug c++/16489] [3.3/3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
2004-07-12 14:06 ` pinskia at gcc dot gnu dot org
2004-07-26 14:46 ` pinskia at gcc dot gnu dot org
2004-07-27 10:57 ` gdr at integrable-solutions dot net
2004-08-01 21:24 ` mmitchel at gcc dot gnu dot org
2004-08-02 1:56 ` cvs-commit at gcc dot gnu dot org
2004-08-02 1:58 ` cvs-commit at gcc dot gnu dot org
2004-08-02 2:01 ` 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).