User: Password:
|
|
Subscribe / Log in / New account

ACCESS_ONCE()

ACCESS_ONCE()

Posted Aug 17, 2012 10:57 UTC (Fri) by dgm (subscriber, #49227)
In reply to: ACCESS_ONCE() by nye
Parent article: ACCESS_ONCE()

> the spec says it can safely do so.

But does the spec say it _has_ to do so? Does it more good or harm?

Not everything that is allowed is good. For example, the compiler is (in theory) allowed to do anything it wants when presented with code that raises undefined behavior. Anything. "rm -rf /" for instance would be 100% correct. Are GCC developers planing this "feature" for gcc 4.8? Of course not, that would be stupid when you could be playing nethack instead...


(Log in to post comments)


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds