On the desktop OS, almost everything (but it must be me). I personally would want to see a large battery of tests that ensures the program code is likely to be working under each new compiler. If generating arbitrary C code and shoving it through arbitrary C compilers works reliably for you, then that’s cool? “Hello world” should reliably work everywhere, so that’s something… I guess.īut that’s just like… my opinion. The less trivial the C code, the more likely you are to run into compatibility problems between compilers. Complex software tends to have bugs somewhere, and a lot of compilers are complex. Rust has run into (and submitted fixes for) so many LLVM bugs over the years that caused silent miscompilation. That’s before even discussing compiler bugs, which will unintentionally break all assumptions of well-behaved code. C can quickly go from “infinitely portable assembler for my cool new language” to “major source of confusion.” Did you know that an infinite loop that doesn’t do anything might be ignored? This materially changes the behavior of the input program in ways that most people wouldn’t expect. Let’s say you are generating C code from your own programming language. And no, it is not trivial to write UB-free C code. Fully “standards-compliant” code that works on one compiler may behave in unexpected ways under another compiler, just due to differences in UB handling. The C standard leaves a lot of UB/implementation specific behavior. I wish C were that simple and well defined. : discussed in the first paragraph here: I've never used Lazarus or FPC beyond just opening it up and playing with it in years past, but it is interesting how much that ecosystem seems to offer. (C code also isn't perfectly portable by any stretch of the imagination, so just having some random C compiler for your platform of choice and some emitted C code doesn't really guarantee that you'll end up with a compatible, working solution.) Even relatively new and/or niche architectures like RISC-V and Xtensa appear to be supported by FPC. I'm skeptical that targeting C opens up any meaningful additional platform support beyond what FPC natively supports. LLVM really means nothing for FPC's portability story at this point, as far as I can tell. The list of supported platforms for FPC is pretty impressive, whereas LLVM support in FPC appears to be very new, and FPC has very limited platform support using LLVM anyways.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |