public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/42115] New: r154072 & r154073 break build of ppl, non-placement deallocation issue
@ 2009-11-20 1:45 rainer at emrich-ebersheim dot de
2009-11-20 1:47 ` [Bug c++/42115] " rainer at emrich-ebersheim dot de
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: rainer at emrich-ebersheim dot de @ 2009-11-20 1:45 UTC (permalink / raw)
To: gcc-bugs
There is an issue with non-placement deallocation:
In file included from
../../../../../../../src/ppl-0.10.2/src/Row.defs.hh:504:0,
from
../../../../../../../src/ppl-0.10.2/src/Linear_Row.defs.hh:28,
from
../../../../../../../src/ppl-0.10.2/src/Constraint.defs.hh:28,
from ../../../../../../../src/ppl-0.10.2/src/Box.defs.hh:33,
from ../../../../../../../src/ppl-0.10.2/src/Box.cc:24:
../../../../../../../src/ppl-0.10.2/src/Row.inlines.hh: In member function
'void
Parma_Polyhedra_Library::Row::allocate(Parma_Polyhedra_Library::dimension_type,
Parma_Polyhedra_Library::Row::Flags)':
../../../../../../../src/ppl-0.10.2/src/Row.inlines.hh:92:1: error:
non-placement deallocation function 'static void
Parma_Polyhedra_Library::Row_Impl_Handler::Impl::operator delete(void*,
Parma_Polyhedra_Library::dimension_type)'
../../../../../../../src/ppl-0.10.2/src/Row.inlines.hh:224:31: error: selected
for placement delete
caused by:
Author: jason
Date: Tue Nov 10 18:18:51 2009
New Revision: 154072
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=154072
Log:
PR c++/34158
PR c++/36406
* call.c (non_placement_deallocation_fn_p): Split out...
(build_op_delete_call): ...from here. Use instantiate_type
for placement delete. Simplify logic.
* pt.c (primary_template_instantiation_p): Non-static.
* cp-tree.h: Declare it.
Added:
trunk/gcc/testsuite/g++.dg/init/placement4.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/call.c
trunk/gcc/cp/cp-tree.h
trunk/gcc/cp/pt.c
trunk/gcc/testsuite/ChangeLog
and
Author: jason
Date: Tue Nov 10 18:31:22 2009
New Revision: 154073
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=154073
Log:
* call.c (build_op_delete_call): Tweak error.
Added:
trunk/gcc/testsuite/g++.dg/init/placement5.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/call.c
trunk/gcc/testsuite/ChangeLog
--
Summary: r154072 & r154073 break build of ppl, non-placement
deallocation issue
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rainer at emrich-ebersheim dot de
GCC build triplet: *-*-mingw32
GCC host triplet: *-*-mingw32
GCC target triplet: *-*-mingw32
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42115
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/42115] r154072 & r154073 break build of ppl, non-placement deallocation issue
2009-11-20 1:45 [Bug c++/42115] New: r154072 & r154073 break build of ppl, non-placement deallocation issue rainer at emrich-ebersheim dot de
@ 2009-11-20 1:47 ` rainer at emrich-ebersheim dot de
2009-11-20 3:06 ` jason at gcc dot gnu dot org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: rainer at emrich-ebersheim dot de @ 2009-11-20 1:47 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from rainer at emrich-ebersheim dot de 2009-11-20 01:47 -------
Created an attachment (id=19063)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19063&action=view)
preprocessed source, still quite large
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42115
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/42115] r154072 & r154073 break build of ppl, non-placement deallocation issue
2009-11-20 1:45 [Bug c++/42115] New: r154072 & r154073 break build of ppl, non-placement deallocation issue rainer at emrich-ebersheim dot de
2009-11-20 1:47 ` [Bug c++/42115] " rainer at emrich-ebersheim dot de
@ 2009-11-20 3:06 ` jason at gcc dot gnu dot org
2009-11-20 3:10 ` jason at gcc dot gnu dot org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-11-20 3:06 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1894 bytes --]
------- Comment #2 from jason at gcc dot gnu dot org 2009-11-20 03:05 -------
I just had another email exchange about this, but can't find it right now.
Anyway, 5.3.4 [expr.new]:
A declaration of a placement deallocation function matches the declaration of a
placement allocation function if it has the same number of parameters and,
after parameter transformations (8.3.5), all parameter types except the first
are identical. Any non-placement deallocation function matches a non-placement
allocation function. If the lookup finds a single matching deallocation
function, that function will be called; otherwise, no deallocation function
will be called. If the lookup finds the two-parameter form of a usual
deallocation function (3.7.4.2) and that function, considered as a placement
deallocation function, would have been selected as a match for the allocation
function, the program is ill-formed. [ Example:
struct S {
// Placement allocation function:
static void* operator new(std::size_t, std::size_t);
// Usual (non-placement) deallocation function:
static void operator delete(void*, std::size_t);
};
// ill-formed: non-placement deallocation function matches
// placement allocation function
S* p = new (0) S;
end example ]
--
jason at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |jason at gcc dot gnu dot org
|dot org |
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2009-11-20 03:06:00
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42115
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/42115] r154072 & r154073 break build of ppl, non-placement deallocation issue
2009-11-20 1:45 [Bug c++/42115] New: r154072 & r154073 break build of ppl, non-placement deallocation issue rainer at emrich-ebersheim dot de
2009-11-20 1:47 ` [Bug c++/42115] " rainer at emrich-ebersheim dot de
2009-11-20 3:06 ` jason at gcc dot gnu dot org
@ 2009-11-20 3:10 ` jason at gcc dot gnu dot org
2009-11-20 5:03 ` jason at gcc dot gnu dot org
2009-11-20 5:06 ` jason at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-11-20 3:10 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from jason at gcc dot gnu dot org 2009-11-20 03:10 -------
That said, I can see a reading whereby since PPL also defines operator delete
(void *), the operator delete (void *, size_t) isn't the usual deallocation
function, so we shouldn't give an error. I'll implement that.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42115
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/42115] r154072 & r154073 break build of ppl, non-placement deallocation issue
2009-11-20 1:45 [Bug c++/42115] New: r154072 & r154073 break build of ppl, non-placement deallocation issue rainer at emrich-ebersheim dot de
` (2 preceding siblings ...)
2009-11-20 3:10 ` jason at gcc dot gnu dot org
@ 2009-11-20 5:03 ` jason at gcc dot gnu dot org
2009-11-20 5:06 ` jason at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-11-20 5:03 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from jason at gcc dot gnu dot org 2009-11-20 05:03 -------
Subject: Bug 42115
Author: jason
Date: Fri Nov 20 05:03:21 2009
New Revision: 154357
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=154357
Log:
PR c++/42115
* call.c (build_op_delete_call): Don't complain about using
op delete (void *, size_t) for placement delete if there's an
op delete (void *).
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/call.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/init/placement5.C
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42115
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/42115] r154072 & r154073 break build of ppl, non-placement deallocation issue
2009-11-20 1:45 [Bug c++/42115] New: r154072 & r154073 break build of ppl, non-placement deallocation issue rainer at emrich-ebersheim dot de
` (3 preceding siblings ...)
2009-11-20 5:03 ` jason at gcc dot gnu dot org
@ 2009-11-20 5:06 ` jason at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-11-20 5:06 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from jason at gcc dot gnu dot org 2009-11-20 05:06 -------
Fixed.
--
jason at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.5.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42115
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-11-20 5:06 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-20 1:45 [Bug c++/42115] New: r154072 & r154073 break build of ppl, non-placement deallocation issue rainer at emrich-ebersheim dot de
2009-11-20 1:47 ` [Bug c++/42115] " rainer at emrich-ebersheim dot de
2009-11-20 3:06 ` jason at gcc dot gnu dot org
2009-11-20 3:10 ` jason at gcc dot gnu dot org
2009-11-20 5:03 ` jason at gcc dot gnu dot org
2009-11-20 5:06 ` jason 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).