|
|
Log in / Subscribe / Register

This is why so many programs use extensions

This is why so many programs use extensions

Posted Sep 27, 2024 2:18 UTC (Fri) by DemiMarie (subscriber, #164188)
In reply to: C is not as simple as it seems by NYKevin
Parent article: Linus and Dirk on succession, Rust, and more

In the Linux kernel, many of those undefined behaviors are actually well-defined, thanks to -fno-strict-aliasing, -fno-strict-overflow, -fno-delete-null-pointer-checks, and possibly some other compiler flags. Linux does not even try to conform to the C standard’s requirements for pointer arithmetic, and I agree with that decision.


to post comments

This is why so many programs use extensions

Posted Sep 29, 2024 19:55 UTC (Sun) by netbsduser (subscriber, #171655) [Link]

Yes, the language the ISO standard defines is, to quote Dennis Ritchie himself, "an unreal language that no one can or will actually use". Needless to say if you can't rely on pointers at least mostly looking like and behaving in use as addresses, you can't write an operating system in the language. How would you ever deal with memory-mapped I/O, for instance?


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