https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126785
Bug ID: 126785
Summary: delete with void* should be rejected when using
-pedantic-errors
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: luigighiron at gmail dot com
Target Milestone: ---
GCC incorrectly accepts the following with -pedantic-errors:
int main(){
void*p=0;
delete p;
}
void* is not a "pointer to object type", so this is invalid and should be
rejected. Clang correctly rejects this with -pedantic-errors.