public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/16441] New: Problen in overloading delete operator.
@ 2004-07-08 19:00 uttamkumar at hotmail dot com
2004-07-08 21:48 ` [Bug c++/16441] " pinskia at gcc dot gnu dot org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: uttamkumar at hotmail dot com @ 2004-07-08 19:00 UTC (permalink / raw)
To: gcc-bugs
I have compilation problem in overloading operator delete.
--
Summary: Problen in overloading delete operator.
Product: gcc
Version: 3.3.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: uttamkumar at hotmail dot com
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16441
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/16441] Problen in overloading delete operator.
2004-07-08 19:00 [Bug c++/16441] New: Problen in overloading delete operator uttamkumar at hotmail dot com
@ 2004-07-08 21:48 ` pinskia at gcc dot gnu dot org
2004-07-09 12:38 ` uttamkumar at hotmail dot com
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-08 21:48 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-07-08 21:48 -------
We need more infomation than what you gave so far, a preprocessed source file would be great.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16441
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/16441] Problen in overloading delete operator.
2004-07-08 19:00 [Bug c++/16441] New: Problen in overloading delete operator uttamkumar at hotmail dot com
2004-07-08 21:48 ` [Bug c++/16441] " pinskia at gcc dot gnu dot org
@ 2004-07-09 12:38 ` uttamkumar at hotmail dot com
2004-07-09 17:43 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: uttamkumar at hotmail dot com @ 2004-07-09 12:38 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From uttamkumar at hotmail dot com 2004-07-09 12:38 -------
(In reply to comment #0)
> I have compilation problem in overloading operator delete.
/********************************************
File : test.cpp
How to compile:
g++ -g -D_REENTRANT -Wall -ansi -ggdb3 -c test.cpp
********************************************/
#include<stdio.h>
#include <stdlib.h>
#include <iostream>
using namespace std ;
inline void operator delete (void *reportedAddress , const char *file,int
line,const char *func)
{
cout<< "Delete:"<<" File:"<<file<< " Line:"<<line<<" Func:"<<endl;
free ( reportedAddress ) ;
return ;
}
void* operator new (size_t size, const char *file,int line,const char *func)
{
cout<< "New:"<<size<<" File:"<<file<< " Line:"<<line<<"
Func:"<<func<<endl;
return malloc ( size ) ;
}
#ifdef new
#undef new
#endif
#ifdef delete
#undef delete
#endif
#define new new ( __FILE__, __LINE__, __FUNCTION__)
#define delete delete ( __FILE__, __LINE__, __FUNCTION__)
typedef struct {
int x;
int y ;
char s[100] ;
}MyStruct ;
void DummyFunction () {
MyStruct *m = new MyStruct () ;
delete m ;
return ;
}
int main (){
DummyFunction () ;
return 0 ;
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16441
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/16441] Problen in overloading delete operator.
2004-07-08 19:00 [Bug c++/16441] New: Problen in overloading delete operator uttamkumar at hotmail dot com
2004-07-08 21:48 ` [Bug c++/16441] " pinskia at gcc dot gnu dot org
2004-07-09 12:38 ` uttamkumar at hotmail dot com
@ 2004-07-09 17:43 ` pinskia at gcc dot gnu dot org
2004-07-12 12:20 ` uttamkumar at hotmail dot com
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-09 17:43 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-07-09 17:43 -------
You cannot do IIRC.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |NEW
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16441
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/16441] Problen in overloading delete operator.
2004-07-08 19:00 [Bug c++/16441] New: Problen in overloading delete operator uttamkumar at hotmail dot com
` (2 preceding siblings ...)
2004-07-09 17:43 ` pinskia at gcc dot gnu dot org
@ 2004-07-12 12:20 ` uttamkumar at hotmail dot com
2004-07-12 14:39 ` pinskia at gcc dot gnu dot org
2004-07-12 15:13 ` [Bug c++/16441] Problem " bangerth at dealii dot org
5 siblings, 0 replies; 7+ messages in thread
From: uttamkumar at hotmail dot com @ 2004-07-12 12:20 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From uttamkumar at hotmail dot com 2004-07-12 12:19 -------
(In reply to comment #3)
> You cannot do IIRC.
I am sorry. What is IIRC?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16441
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/16441] Problen in overloading delete operator.
2004-07-08 19:00 [Bug c++/16441] New: Problen in overloading delete operator uttamkumar at hotmail dot com
` (3 preceding siblings ...)
2004-07-12 12:20 ` uttamkumar at hotmail dot com
@ 2004-07-12 14:39 ` pinskia at gcc dot gnu dot org
2004-07-12 15:13 ` [Bug c++/16441] Problem " bangerth at dealii dot org
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-12 14:39 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-07-12 14:39 -------
I meant you cannot do this IIRC (if I recall correctly).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16441
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/16441] Problem in overloading delete operator.
2004-07-08 19:00 [Bug c++/16441] New: Problen in overloading delete operator uttamkumar at hotmail dot com
` (4 preceding siblings ...)
2004-07-12 14:39 ` pinskia at gcc dot gnu dot org
@ 2004-07-12 15:13 ` bangerth at dealii dot org
5 siblings, 0 replies; 7+ messages in thread
From: bangerth at dealii dot org @ 2004-07-12 15:13 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bangerth at dealii dot org 2004-07-12 15:13 -------
The call sequence should be
delete (__FILE__, __LINE__, __FUNCTION__, pointer);
instead of
delete (__FILE__, __LINE__, __FUNCTION__) pointer;
W.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
Summary|Problen in overloading |Problem in overloading
|delete operator. |delete operator.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16441
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2004-07-12 15:13 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-08 19:00 [Bug c++/16441] New: Problen in overloading delete operator uttamkumar at hotmail dot com
2004-07-08 21:48 ` [Bug c++/16441] " pinskia at gcc dot gnu dot org
2004-07-09 12:38 ` uttamkumar at hotmail dot com
2004-07-09 17:43 ` pinskia at gcc dot gnu dot org
2004-07-12 12:20 ` uttamkumar at hotmail dot com
2004-07-12 14:39 ` pinskia at gcc dot gnu dot org
2004-07-12 15:13 ` [Bug c++/16441] Problem " bangerth at dealii 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).