3 ms·
Eh, that's fine, nobody writes OSs in standard C without compiler extensions either.
by yjftsjthsd-h 4y ago
Eh, that's fine, nobody writes OSs in standard C without compiler extensions either.
- Rochus 4y agoThere are a couple of operating systems which indeed use standard C; Linux is rather an exception in this respect.
- yjftsjthsd-h 4y agoWhat OSs would those be? AFAIK none of the major ones - NT, Linux, illumos, or the BSDs are in standard C.
- kevin_thibedeau 4y agoAll of the embedded OSs. They need to support a mixture of commercial C compilers that don't support GNU extensions.
- pjmlp 4y agoSince when is inline assembly and a couple of language extensions they have part of ISO C?
- Rochus 4y agoThere is no need for inline assembly. Modules written in assembler can be separate from C code. And if you consider "//" a language extension, then yes, everybody and their dogs seem to use them, and nearly every compiler seems to support them.
- pjmlp 4y agoWhen I look at those embedded OSes, I see more than just what ISO C89 allows for, beyond //.
- Rochus 4y agoMy argument is extended ad absurdum in this thread anyway. My point was that Lisa Pascal has made several significant language extensions compared to original Pascal, such as a module system, pointer handling like in C, compiler directives, etc. - all things Wirth himself later added to Modula-2; these were intended, significant and documented extensions under the name "Lisa Pascal", not just the usual errors, inaccuracies and "common deviations" that you find in every C compiler, and that force you to secure libraries with #ifdefs.
- pjmlp 4y agoMany of those things were already present in ISO Extended Pascal and UCSD Pascal. > not just the usual errors, inaccuracies and "common deviations" that you find in every C compiler, and that force you to secure libraries with #ifdefs. And extension keywords for microcontrollers specific features, intrisics for CPU instructions, DSP specific capabilities,.... Yeah I am already used that what goes for Pascal gets another weigth when placed against C.
- Rochus 4y agoApple II and III Pascal (and in consequence Lisa Pascal, but there was e.g. not UNIT or USES syntax in USCD) were indeed based on USCD Pascal, but ISO 10206 was a decade later as far as I remember.
- pjmlp 4y agoThere were other Pascals around with system programing extensions, quite a few were eventually standardized in ISO 10206 (1991). http://pascal.hansotten.com/ http://pascal.hansotten.com/ And while the discussions keep going around Pascal and its extensions, there is this little detail of Modula-2 being released in 1978, where all the issues with Pascal (as originally designed by Wirth) for systems programming were already fixed.
- Rochus 4y ago
- Kranar 4y agoCan you name them? Even the academic/research ones or the barebones embedded kernels I'm familiar with use extensions to get things like context switching/multitasking/threading to work.
- foobarian 4y agoEven without compiler extensions the integration with the linker system is a huge strength of C
- pjmlp 4y agoJust any compiled language.