[Bug c++/32085] "warning: deleting void* is undefined" sometimes bogus

2007-05-30 Thread andrew dot stubbs at st dot com
--- Comment #9 from andrew dot stubbs at st dot com 2007-05-30 08:51 --- OK, I see what you are getting at now. The delete is defined (by the code), but the warning concerns the destructor also. Anyway, as you say, the warning can be silenced by casting to char*. -- andrew dot stub

[Bug c++/32085] "warning: deleting void* is undefined" sometimes bogus

2007-05-29 Thread bangerth at dealii dot org
--- Comment #8 from bangerth at dealii dot org 2007-05-30 05:13 --- The point Gabriel and the others are trying to make is that when calling operator delete on a pointer, first the object is destroyed by calling the destructor (or doing nothing in case this is a plain-old-data type), the

[Bug c++/32085] "warning: deleting void* is undefined" sometimes bogus

2007-05-29 Thread manu at gcc dot gnu dot org
--- Comment #7 from manu at gcc dot gnu dot org 2007-05-29 12:26 --- (In reply to comment #6) > It's a cut down example to demonstrate the problem, not real world code. Could you provide an example of real-world code where the warning is triggered? We would prefer minimal but anything i

[Bug c++/32085] "warning: deleting void* is undefined" sometimes bogus

2007-05-29 Thread andrew dot stubbs at st dot com
--- Comment #6 from andrew dot stubbs at st dot com 2007-05-29 11:18 --- It's a cut down example to demonstrate the problem, not real world code. I do ignore warnings in code that does exactly what I want it to do, provided that I understand them. -- http://gcc.gnu.org/bugzilla/sh

[Bug c++/32085] "warning: deleting void* is undefined" sometimes bogus

2007-05-29 Thread gdr at cs dot tamu dot edu
--- Comment #5 from gdr at cs dot tamu dot edu 2007-05-29 11:11 --- Subject: Re: "warning: deleting void* is undefined" sometimes bogus "andrew dot stubbs at st dot com" <[EMAIL PROTECTED]> writes: | Well, obviously I'll let people who really understand the details of this | decide wh

[Bug c++/32085] "warning: deleting void* is undefined" sometimes bogus

2007-05-29 Thread andrew dot stubbs at st dot com
--- Comment #4 from andrew dot stubbs at st dot com 2007-05-29 10:57 --- Well, obviously I'll let people who really understand the details of this decide whether it can be solved. However, on the principle that warnings which one can safely ignore, but cannot silence, are at best unhel

[Bug c++/32085] "warning: deleting void* is undefined" sometimes bogus

2007-05-25 Thread pinskia at gcc dot gnu dot org
--- Comment #3 from pinskia at gcc dot gnu dot org 2007-05-25 16:51 --- First the operator delete you created is overriding the normal operator delete (which is valid). Second you don't know the real type when deleting void* so it is hard to figure out if we should warn or not. -- h

[Bug c++/32085] "warning: deleting void* is undefined" sometimes bogus

2007-05-25 Thread andrew dot stubbs at st dot com
--- Comment #2 from andrew dot stubbs at st dot com 2007-05-25 16:16 --- I'm confused. It might be the case that there is a type for which this warning is valid - I don't know C++ well enough to confirm or deny that - but in *this* example, and perhaps others like it, the warning is mi

[Bug c++/32085] "warning: deleting void* is undefined" sometimes bogus

2007-05-25 Thread pinskia at gcc dot gnu dot org
--- Comment #1 from pinskia at gcc dot gnu dot org 2007-05-25 15:37 --- No, even then it is still undefined because you don't call the deconstructor for non-PODs. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32085