https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79697
Peter Bergner <bergner at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bergner at gcc dot gnu.org --- Comment #5 from Peter Bergner <bergner at gcc dot gnu.org> --- (In reply to prathamesh3492 from comment #4) > The attached (untested) patch does not mark stmt necessary if it's a call > stmt and callee is strdup/strndup, and ... Why do we have to special case these functions? Why can't we do this for all functions that are marked as const/pure, since we know they have no side effects other than their return value?