public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/27935] New: gcc fails to compile code with operator delete(void*,size_t)
@ 2006-06-07 16:35 charles at kde dot org
2006-06-07 16:47 ` [Bug c++/27935] " pinskia at gcc dot gnu dot org
` (10 more replies)
0 siblings, 11 replies; 12+ messages in thread
From: charles at kde dot org @ 2006-06-07 16:35 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 930 bytes --]
The following code (taken from §12.5 "Free Store" of the C++ Standards, with
some simplifications) fails to compile:
struct B
{
virtual ~B() { } // line 5
void operator delete(void*, size_t);
};
test.cpp:5: error: no suitable 'operator delete' for 'B'
(The code taken directly from the C++ standard without modification fails as
well)
if you remove the size_t parameter, it succeeds
This kind of code exists in KDE's khtml.
--
Summary: gcc fails to compile code with operator
delete(void*,size_t)
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: charles at kde dot org
GCC host triplet: gcc version 4.1.2 20060601 (prerelease) (Debian 4.1.1-1)
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27935
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/27935] gcc fails to compile code with operator delete(void*,size_t)
2006-06-07 16:35 [Bug c++/27935] New: gcc fails to compile code with operator delete(void*,size_t) charles at kde dot org
@ 2006-06-07 16:47 ` pinskia at gcc dot gnu dot org
2006-06-07 16:50 ` pinskia at gcc dot gnu dot org
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-06-07 16:47 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2006-06-07 16:44 -------
A full testcase:
struct a
{
void operator delete (void*, unsigned int);
~a();
};
void g(a *b)
{
delete b;
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27935
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/27935] gcc fails to compile code with operator delete(void*,size_t)
2006-06-07 16:35 [Bug c++/27935] New: gcc fails to compile code with operator delete(void*,size_t) charles at kde dot org
2006-06-07 16:47 ` [Bug c++/27935] " pinskia at gcc dot gnu dot org
@ 2006-06-07 16:50 ` pinskia at gcc dot gnu dot org
2006-06-07 16:54 ` pinskia at gcc dot gnu dot org
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-06-07 16:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2006-06-07 16:47 -------
Actually my testcase is invalid as "unsigned int" is not always size_t. In
fact if I change it to "unsigned long" for x86_64 and PPC-darwin, it passes in
4.1.0 20060208 and 4.2.0 20060507.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27935
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/27935] gcc fails to compile code with operator delete(void*,size_t)
2006-06-07 16:35 [Bug c++/27935] New: gcc fails to compile code with operator delete(void*,size_t) charles at kde dot org
2006-06-07 16:47 ` [Bug c++/27935] " pinskia at gcc dot gnu dot org
2006-06-07 16:50 ` pinskia at gcc dot gnu dot org
@ 2006-06-07 16:54 ` pinskia at gcc dot gnu dot org
2006-06-07 17:43 ` pinskia at gcc dot gnu dot org
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-06-07 16:54 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pinskia at gcc dot gnu dot org 2006-06-07 16:50 -------
It also works in 4.1.2 20060529 and in 4.2.0 20060604.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27935
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/27935] gcc fails to compile code with operator delete(void*,size_t)
2006-06-07 16:35 [Bug c++/27935] New: gcc fails to compile code with operator delete(void*,size_t) charles at kde dot org
` (2 preceding siblings ...)
2006-06-07 16:54 ` pinskia at gcc dot gnu dot org
@ 2006-06-07 17:43 ` pinskia at gcc dot gnu dot org
2006-06-07 20:41 ` Woebbeking at web dot de
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-06-07 17:43 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from pinskia at gcc dot gnu dot org 2006-06-07 16:54 -------
This works for me so closing as invalid. And yes I changed ~a to virtual ~a
also and it still works.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27935
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/27935] gcc fails to compile code with operator delete(void*,size_t)
2006-06-07 16:35 [Bug c++/27935] New: gcc fails to compile code with operator delete(void*,size_t) charles at kde dot org
` (3 preceding siblings ...)
2006-06-07 17:43 ` pinskia at gcc dot gnu dot org
@ 2006-06-07 20:41 ` Woebbeking at web dot de
2006-06-08 0:54 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Woebbeking at web dot de @ 2006-06-07 20:41 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from Woebbeking at web dot de 2006-06-07 20:30 -------
FYI, it doesn't work in
gcc version 4.1.2 20060604 (prerelease) (Debian 4.1.1-2)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27935
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/27935] gcc fails to compile code with operator delete(void*,size_t)
2006-06-07 16:35 [Bug c++/27935] New: gcc fails to compile code with operator delete(void*,size_t) charles at kde dot org
` (4 preceding siblings ...)
2006-06-07 20:41 ` Woebbeking at web dot de
@ 2006-06-08 0:54 ` pinskia at gcc dot gnu dot org
2006-06-08 13:28 ` charles at kde dot org
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-06-08 0:54 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from pinskia at gcc dot gnu dot org 2006-06-08 00:33 -------
(In reply to comment #5)
> gcc version 4.1.2 20060604 (prerelease) (Debian 4.1.1-2)
Can you provide a source which cause does not error out because size_t?
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |Woebbeking at web dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27935
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/27935] gcc fails to compile code with operator delete(void*,size_t)
2006-06-07 16:35 [Bug c++/27935] New: gcc fails to compile code with operator delete(void*,size_t) charles at kde dot org
` (5 preceding siblings ...)
2006-06-08 0:54 ` pinskia at gcc dot gnu dot org
@ 2006-06-08 13:28 ` charles at kde dot org
2006-06-08 14:36 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: charles at kde dot org @ 2006-06-08 13:28 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from charles at kde dot org 2006-06-08 13:04 -------
Created an attachment (id=11635)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11635&action=view)
compiles on 4.0
just #include <cstddef>
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27935
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/27935] gcc fails to compile code with operator delete(void*,size_t)
2006-06-07 16:35 [Bug c++/27935] New: gcc fails to compile code with operator delete(void*,size_t) charles at kde dot org
` (6 preceding siblings ...)
2006-06-08 13:28 ` charles at kde dot org
@ 2006-06-08 14:36 ` pinskia at gcc dot gnu dot org
2006-08-21 5:17 ` quanah at stanford dot edu
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-06-08 14:36 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from pinskia at gcc dot gnu dot org 2006-06-08 14:32 -------
Works in 4.2.0 20060507 and 4.1.0 20060208 and 4.1.2 20060529.
And works as of today in 4.1.2 20060608 so this is still invalid.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27935
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/27935] gcc fails to compile code with operator delete(void*,size_t)
2006-06-07 16:35 [Bug c++/27935] New: gcc fails to compile code with operator delete(void*,size_t) charles at kde dot org
` (7 preceding siblings ...)
2006-06-08 14:36 ` pinskia at gcc dot gnu dot org
@ 2006-08-21 5:17 ` quanah at stanford dot edu
2006-08-21 6:28 ` quanah at stanford dot edu
2007-05-17 15:13 ` ebotcazou at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: quanah at stanford dot edu @ 2006-08-21 5:17 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from quanah at stanford dot edu 2006-08-21 05:17 -------
I am hitting this bug in gcc 4.0.3, trying to compile MySQL 5.0.19 and 5.0.24.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27935
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/27935] gcc fails to compile code with operator delete(void*,size_t)
2006-06-07 16:35 [Bug c++/27935] New: gcc fails to compile code with operator delete(void*,size_t) charles at kde dot org
` (8 preceding siblings ...)
2006-08-21 5:17 ` quanah at stanford dot edu
@ 2006-08-21 6:28 ` quanah at stanford dot edu
2007-05-17 15:13 ` ebotcazou at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: quanah at stanford dot edu @ 2006-08-21 6:28 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from quanah at stanford dot edu 2006-08-21 06:28 -------
MySQL compiles fine with gcc3.3 and gcc3.4, so this is definately a problem in
4.0.3 itself.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27935
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/27935] gcc fails to compile code with operator delete(void*,size_t)
2006-06-07 16:35 [Bug c++/27935] New: gcc fails to compile code with operator delete(void*,size_t) charles at kde dot org
` (9 preceding siblings ...)
2006-08-21 6:28 ` quanah at stanford dot edu
@ 2007-05-17 15:13 ` ebotcazou at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2007-05-17 15:13 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from ebotcazou at gcc dot gnu dot org 2007-05-17 16:13 -------
*** Bug 29045 has been marked as a duplicate of this bug. ***
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27935
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2007-05-17 15:13 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-07 16:35 [Bug c++/27935] New: gcc fails to compile code with operator delete(void*,size_t) charles at kde dot org
2006-06-07 16:47 ` [Bug c++/27935] " pinskia at gcc dot gnu dot org
2006-06-07 16:50 ` pinskia at gcc dot gnu dot org
2006-06-07 16:54 ` pinskia at gcc dot gnu dot org
2006-06-07 17:43 ` pinskia at gcc dot gnu dot org
2006-06-07 20:41 ` Woebbeking at web dot de
2006-06-08 0:54 ` pinskia at gcc dot gnu dot org
2006-06-08 13:28 ` charles at kde dot org
2006-06-08 14:36 ` pinskia at gcc dot gnu dot org
2006-08-21 5:17 ` quanah at stanford dot edu
2006-08-21 6:28 ` quanah at stanford dot edu
2007-05-17 15:13 ` ebotcazou 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).