This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: delete[] works on static arrays


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

delete.diff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]