public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/11703] New: Problem with using enum in placement delete
@ 2003-07-29 6:03 gcc-bugzilla at gcc dot gnu dot org
2003-07-29 12:01 ` [Bug c++/11703] [3.4 Regression] " pinskia at physics dot uc dot edu
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: gcc-bugzilla at gcc dot gnu dot org @ 2003-07-29 6:03 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11703
Summary: Problem with using enum in placement delete
Product: gcc
Version: 3.4
Status: UNCONFIRMED
Severity: critical
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: snyder at fnal dot gov
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
g++ gives an error for the code below, which i believe to be valid:
$ g++ -c -Iinclude x.cc
x.cc: In function `void make()':
x.cc:16: error: invalid conversion from `int' to `Refcount_Type'
$
I think this problem was introduced by the patch to fix c++/11667.
Environment:
System: Linux karma 2.4.19-emp_2419p5a829i #1 Tue Sep 3 17:42:17 EST 2002 i686 i686 i386 GNU/Linux
Architecture: i686
<machine, os, target, libraries (multiple lines)>
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../gcc/configure --prefix=/usr/local/gcc --enable-threads=posix --enable-long-long --enable-languages=c,c++,f77
How-To-Repeat:
-----------------------
typedef unsigned int size_t;
enum Refcount_Type {
NO_REFCOUNT,
};
struct d0_Unknown_Object
{
void* operator new (size_t, size_t, Refcount_Type type);
void operator delete (void*, size_t, Refcount_Type);
d0_Unknown_Object ();
};
void make ()
{
new (10, NO_REFCOUNT) d0_Unknown_Object;
}
-----------------------
------- Additional Comments From snyder at fnal dot gov 2003-07-29 06:03 -------
Fix:
<how to correct or work around the problem, if known (multiple lines)>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/11703] [3.4 Regression] Problem with using enum in placement delete
2003-07-29 6:03 [Bug c++/11703] New: Problem with using enum in placement delete gcc-bugzilla at gcc dot gnu dot org
@ 2003-07-29 12:01 ` pinskia at physics dot uc dot edu
2003-08-02 4:15 ` pinskia at physics dot uc dot edu
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-07-29 12:01 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11703
pinskia at physics dot uc dot edu changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |rejects-valid
Priority|P2 |P1
Last reconfirmed|0000-00-00 00:00:00 |2003-07-29 12:01:04
date| |
Summary|Problem with using enum in |[3.4 Regression] Problem
|placement delete |with using enum in placement
| |delete
Target Milestone|--- |3.4
------- Additional Comments From pinskia at physics dot uc dot edu 2003-07-29 12:01 -------
I can confirm this on i686-pc-linux-gnu on the mainline (20030729, Tue Jul 29 04:16:44
UTC 2003) but on powerpc-apple-darwin6.3 (where I had to change size_t to be a
unsigned long), it does not fail for some reason.
And it does not fail in 20030728 so this is a regression.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/11703] [3.4 Regression] Problem with using enum in placement delete
2003-07-29 6:03 [Bug c++/11703] New: Problem with using enum in placement delete gcc-bugzilla at gcc dot gnu dot org
2003-07-29 12:01 ` [Bug c++/11703] [3.4 Regression] " pinskia at physics dot uc dot edu
@ 2003-08-02 4:15 ` pinskia at physics dot uc dot edu
2003-08-04 18:55 ` snyder at fnal dot gov
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-08-02 4:15 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11703
pinskia at physics dot uc dot edu changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
------- Additional Comments From pinskia at physics dot uc dot edu 2003-08-02 04:15 -------
Fixed in the mainline (20030801), will submit a testcase.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/11703] [3.4 Regression] Problem with using enum in placement delete
2003-07-29 6:03 [Bug c++/11703] New: Problem with using enum in placement delete gcc-bugzilla at gcc dot gnu dot org
2003-07-29 12:01 ` [Bug c++/11703] [3.4 Regression] " pinskia at physics dot uc dot edu
2003-08-02 4:15 ` pinskia at physics dot uc dot edu
@ 2003-08-04 18:55 ` snyder at fnal dot gov
2003-08-04 19:20 ` pinskia at physics dot uc dot edu
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: snyder at fnal dot gov @ 2003-08-04 18:55 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11703
------- Additional Comments From snyder at fnal dot gov 2003-08-04 18:55 -------
I still see this error in 20030804.
GNU C++ version 3.4 20030804 (experimental) (i686-pc-linux-gnu)
compiled by GNU C version 3.4 20030728 (experimental).
GGC heuristics: --param ggc-min-expand=47 --param ggc-min-heapsize=31909
gccbug11703.cc: In function `void make()':
gccbug11703.cc:16: error: invalid conversion from `int' to `Refcount_Type'
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/11703] [3.4 Regression] Problem with using enum in placement delete
2003-07-29 6:03 [Bug c++/11703] New: Problem with using enum in placement delete gcc-bugzilla at gcc dot gnu dot org
` (2 preceding siblings ...)
2003-08-04 18:55 ` snyder at fnal dot gov
@ 2003-08-04 19:20 ` pinskia at physics dot uc dot edu
2003-08-07 18:38 ` pinskia at physics dot uc dot edu
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-08-04 19:20 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11703
pinskia at physics dot uc dot edu changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |
------- Additional Comments From pinskia at physics dot uc dot edu 2003-08-04 19:19 -------
I need to stop testing bugs where they did not fail before (powerpc-apple-darwin6.6).
Sorry about that.
I can confirm this fails on the mainline (20030804) on i686-pc-linuc-gnu.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/11703] [3.4 Regression] Problem with using enum in placement delete
2003-07-29 6:03 [Bug c++/11703] New: Problem with using enum in placement delete gcc-bugzilla at gcc dot gnu dot org
` (3 preceding siblings ...)
2003-08-04 19:20 ` pinskia at physics dot uc dot edu
@ 2003-08-07 18:38 ` pinskia at physics dot uc dot edu
2003-08-11 21:40 ` janis187 at us dot ibm dot com
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-08-07 18:38 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11703
pinskia at physics dot uc dot edu changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |NEW
------- Additional Comments From pinskia at physics dot uc dot edu 2003-08-07 18:38 -------
>From Phil's regression hunter: Search converges between 2003-07-28-trunk (#356) and
2003-07-29-trunk (#357).
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/11703] [3.4 Regression] Problem with using enum in placement delete
2003-07-29 6:03 [Bug c++/11703] New: Problem with using enum in placement delete gcc-bugzilla at gcc dot gnu dot org
` (4 preceding siblings ...)
2003-08-07 18:38 ` pinskia at physics dot uc dot edu
@ 2003-08-11 21:40 ` janis187 at us dot ibm dot com
2003-08-12 22:26 ` cvs-commit at gcc dot gnu dot org
2003-08-12 22:28 ` mmitchel at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: janis187 at us dot ibm dot com @ 2003-08-11 21:40 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11703
janis187 at us dot ibm dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mmitchel at gcc dot gnu dot
| |org
------- Additional Comments From janis187 at us dot ibm dot com 2003-08-11 21:40 -------
I can confirm the submitter's suspicion that the regression in PR 11703
was introduced or exposed by the fix for PR 11667 on 2003-07-28.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/11703] [3.4 Regression] Problem with using enum in placement delete
2003-07-29 6:03 [Bug c++/11703] New: Problem with using enum in placement delete gcc-bugzilla at gcc dot gnu dot org
` (5 preceding siblings ...)
2003-08-11 21:40 ` janis187 at us dot ibm dot com
@ 2003-08-12 22:26 ` cvs-commit at gcc dot gnu dot org
2003-08-12 22:28 ` mmitchel at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2003-08-12 22:26 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11703
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2003-08-12 22:26 -------
Subject: Bug 11703
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: mmitchel@gcc.gnu.org 2003-08-12 22:26:26
Modified files:
gcc/cp : ChangeLog call.c class.c cp-tree.h decl.c
decl2.c lex.c parser.c pt.c ptree.c semantics.c
gcc/testsuite : ChangeLog
gcc/testsuite/g++.old-deja/g++.other: decl5.C
Added files:
gcc/testsuite/g++.dg/init: new8.C
gcc/testsuite/g++.dg/parse: qualified2.C ret-type2.C typedef5.C
Log message:
PR c++/11703
* call.c (type_passed_as): Use TYPE_SIZE, not TYPE_PRECISION to
determine whether or not to promote types.
(convert_for_arg_passing): Likewise.
* decl2.c (cp_build_parm_decl): Do not set DECL_ARG_TYPE in
templates.
* pt.c (tsubst_decl): Do not expect it to be set.
PR c++/9512
PR c++/10923
* cp-tree.h (check_elaborated_type_specifier): Declare.
(handle_class_head): Remove.
(note_got_semicolon): Likewise.
(note_list_got_semicolon): Likewise.
(finish_class_definition): Likewise.
* decl.c (check_elaborated_type_specifier): Make it public.
Robustify.
(handle_class_head): Remove.
* parser.c (cp_parser_elaborated_type_specifier): Use
check_elaborated_type_specifier.
(cp_parser_class_specifier): Do not call finish_class_definition.
(cp_parser_class_head): Or handle_class_head. Check for
over-qualified names.
* semantics.c (finish_class_definition): Remove.
* parser.c (cp_parser_check_for_definition_in_return_type): New
function.
(cp_parser_simple_declaration): Adjust call to
cp_parser_init_declarator.
(cp_parser_decl_specifier_seq): Change type of
declares_class_or_enum parameter.
(cp_parser_explicit_instantiation): Adjust accordingly.
(cp_parser_type_specifier): Change type of
declares_class_or_enum parameter.
(cp_parser_init_declarator): Add declares_class_or_enum
parameter.
(cp_parser_parameter_declaration): Adjust call to
cp_parser_decl_specifier_seq.
(cp_parser_function_definition): Likewise.
(cp_parser_member_declaration): Likewise.
(cp_parser_single_declaration): Likewise.
* cp-tree.h (lang_type_class): Remove has_call_overloaded,
has_array_ref_overloaded, has_arrow_overloaded, and got_semicolon.
(TYPE_OVERLOADS_CALL_EXPR): Remove.
(TYPE_OVERLOADS_ARRAY_REF): Likewise.
(TYPE_OVERLOADS_ARROW): Likewise.
(CLASSTYPE_GOT_SEMICOLON): Likewise.
* class.c (check_bases): Do not set them.
(finish_struct_1): Likewise.
* decl.c (cp_finish_decl): Do not set CLASSTYPE_GOT_SEMICOLON.
(build_ptrmemfunc_type): Likewise.
(grok_op_properties): Do not set TYPE_OVERLOADS_*.
(start_function): Do not check CLASSTYPE_GOT_SEMICOLON.
* decl2.c (grokfield): Do not set CLASSTYPE_GOT_SEMICOLON.
* lex.c (note_got_semicolon): Remove.
(note_list_got_semicolon): Likewise.
* parser.c (cp_parser_simple_declaration): Do not call
note_list_got_semicolon.
* pt.c (list_eq): Remove.
(lookup_template_class): Do not set CLASSTYPE_GOT_SEMICOLON.
(instantiate_class_template): Do not set TYPE_OVERLOADS*.
(instantiate_class_template): Do not set CLASSTYPE_GOT_SEMICOLON.
* ptree.c (cxx_print_type): Do not print them.
* semantics.c (finish_member_class_template): Do not call
note_list_got_semicolon.
* g++.dg/parse/ret-type2.C: New test.
PR c++/11703
* g++.dg/init/new8.C: New test.
PR c++/10923
* g++.dg/parse/typedef5.C: New test.
PR c++/9512
* g++.dg/parse/qualified2.C: New test.
* g++.old-deja/g++.other/decl5.C: Mark one more instance of
invalid code.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.3597&r2=1.3598
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/call.c.diff?cvsroot=gcc&r1=1.420&r2=1.421
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/class.c.diff?cvsroot=gcc&r1=1.562&r2=1.563
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/cp-tree.h.diff?cvsroot=gcc&r1=1.900&r2=1.901
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl.c.diff?cvsroot=gcc&r1=1.1111&r2=1.1112
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl2.c.diff?cvsroot=gcc&r1=1.658&r2=1.659
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/lex.c.diff?cvsroot=gcc&r1=1.314&r2=1.315
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&r1=1.99&r2=1.100
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/pt.c.diff?cvsroot=gcc&r1=1.754&r2=1.755
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ptree.c.diff?cvsroot=gcc&r1=1.36&r2=1.37
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/semantics.c.diff?cvsroot=gcc&r1=1.344&r2=1.345
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.2968&r2=1.2969
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/init/new8.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/qualified2.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/ret-type2.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/typedef5.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.old-deja/g++.other/decl5.C.diff?cvsroot=gcc&r1=1.7&r2=1.8
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/11703] [3.4 Regression] Problem with using enum in placement delete
2003-07-29 6:03 [Bug c++/11703] New: Problem with using enum in placement delete gcc-bugzilla at gcc dot gnu dot org
` (6 preceding siblings ...)
2003-08-12 22:26 ` cvs-commit at gcc dot gnu dot org
@ 2003-08-12 22:28 ` mmitchel at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2003-08-12 22:28 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11703
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
------- Additional Comments From mmitchel at gcc dot gnu dot org 2003-08-12 22:28 -------
Fixed in GCC 3.4.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2003-08-12 22:28 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-29 6:03 [Bug c++/11703] New: Problem with using enum in placement delete gcc-bugzilla at gcc dot gnu dot org
2003-07-29 12:01 ` [Bug c++/11703] [3.4 Regression] " pinskia at physics dot uc dot edu
2003-08-02 4:15 ` pinskia at physics dot uc dot edu
2003-08-04 18:55 ` snyder at fnal dot gov
2003-08-04 19:20 ` pinskia at physics dot uc dot edu
2003-08-07 18:38 ` pinskia at physics dot uc dot edu
2003-08-11 21:40 ` janis187 at us dot ibm dot com
2003-08-12 22:26 ` cvs-commit at gcc dot gnu dot org
2003-08-12 22:28 ` 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).