egcs allows deletion of const objects.
Louidor Erez
s3824888@techst02.technion.ac.il
Mon Oct 5 14:11:00 GMT 1998
Here is another bug I've found:
int main() {
const char* string = new char();
delete string; // This shouldn't be allowed.
}
The delete operator cannot be applied to a pointer to const object,
however egcs compiled it without a diagnostic.
My egcs version:
Reading specs from /usr/local/egcs/lib/gcc-lib/i586-pc-linux-gnulibc1/egcs-2.91.57/specs
gcc version egcs-2.91.57 19980901 (egcs-1.1 release)
Hope this helps,
Erez.
BTW: I've tried looking in the archives for this mailing list for a report
of this bug but couldn't find any. It might be easier if the archives were
searchable.
More information about the Gcc-bugs
mailing list