News for hackers. Stuff that matters.
Re:“gcc will quietly break nearly half of all the packages t... by barrkel on Saturday October 24, 2015 @01:41PM (#10444281)
Your definition of undefined behaviour is actually the definition for unspecified behaviour.

Unspecified behaviour is usually intentional ambiguity either to give wiggle room for an optimizer, or to accommodate platform variance. Writing a program with that invokes unspecified behaviour isn't normally a problem, as long as you're not relying on a specific result. Order of argument evaluation is a common example.

Relying on undefined behaviour is almost always bad, and almost always avoidable. That's where the nasal demons come from. Dereferencing null, alias-creating pointer typecasting, etc.

There are no comments on this comment yet.