delete[] works on static arrays

Alexandre Oliva oliva@dcc.unicamp.br
Sun Jun 7 14:13:00 GMT 1998


Guillaume Laurent <glaurent@worldnet.fr> writes:

> The following compiles cleanly with egcs 1.0.3, while it shouldn't :

> int main(void) { char a[120]; delete[] a; return 0; }

> Replacing 'delete[]' by 'delete' yields an expected error message, though.

Thanks for your report.  The attached patch should fix this problem.

-- 
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil
-------------- next part --------------
A non-text attachment was scrubbed...
Name: delete.diff
Type: text/x-diff
Size: 1681 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/19980607/941dd1cb/attachment.bin>


More information about the Gcc-patches mailing list