g++ bug report
Alexandre Oliva
aoliva@redhat.com
Sat Jun 9 14:30:00 GMT 2001
On Jun 9, 2001, Oscar Fuentes <ofv@wanadoo.es> wrote:
> On 09 Jun 2001 15:34:02 -0300, Alexandre Oliva <aoliva@redhat.com>
> wrote:
>> On Jun 9, 2001, Oscar Fuentes <ofv@wanadoo.es> wrote:
>>
>>> G++ fails to compile this valid code:
>>
>>> MyClass **p;
>>> *p = new (MyClass*)[10];
>>
>> Why do you think this is valid?
> Quoting James Kanze in comp.lang.c++.moderated thread "{delete p; p =
> NULL; }" on 1 June 2001 09:15:28 -0400
[snip]
>> The expression is the equivalent of
>>
>> *p = *((new MyClass*) + 10)
I see. Will you please file a bug report with Gnats, if you haven't
done so yet. This helps make sure the bug report will not get lost.
Thanks in advance,
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me
More information about the Gcc-bugs
mailing list