warning with gcc 2.95.1
Nathan Sidwell
nathan@acm.org
Tue Aug 31 23:20:00 GMT 1999
Jean-Frangois MORCILLO wrote:
> the code look like this :
> void my_delete(void *adr)
> {
> //some stuff
> ...
> //free memory
> delete adr ;
> }
>
> in the C++ Programming Lanhuage Third edition, le the prototype for operator delete is the
> same....
[expr.delete] 5.3.5/2
'... the pointer shall be a pointer to a non-array object ...'
void * is not a pointer to object. Your code is incorrect. You might mean
operator delete (adr);
which _is_ different.
nathan
--
Dr Nathan Sidwell :: Computer Science Department :: Bristol University
I have seen the death of PhotoShop -- it is called GIMP
nathan@acm.org http://www.cs.bris.ac.uk/~nathan/ nathan@cs.bris.ac.uk
More information about the Gcc
mailing list