At 13:05 24/09/2009, Jim Idle wrote: >Some platforms define this to be undefined though. Remember there >are lots if embedded systems that use this. Hence the qualification. >I think it would have been better to define free(NULL) as safe >myself but early Lib C would crash if you did this and I think it >was C++ that first took a stand?
I haven't looked at the standards recently, but from what I recall "delete NULL;" is guaranteed safe but "free(NULL);" wasn't. I definitely recall seeing some static testers and malloc replacements (some for performance, some for allocation debugging) that reacted badly to use of "free(NULL);" (sometimes just a failed assertion, sometimes worse). List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "il-antlr-interest" group. To post to this group, send email to il-antlr-interest@googlegroups.com To unsubscribe from this group, send email to il-antlr-interest+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en -~----------~----~----~----~------~----~------~--~---