3 ms·
Just checked on gotbolt.com - clangg, icc, msvc all compile gets just fine. They also work with k&r style definitions as well. I am sure there are broken C com
by theamk 7y ago
Just checked on gotbolt.com - clangg, icc, msvc all compile gets just fine. They also work with k&r style definitions as well.
I am sure there are broken C compilers out there which don’t implement entire language. Heck, I use one sometimes. But I don’t think this proves your point at all.
You need better examples.
- pjmlp 7y agoThat only proves that those compilers are not willing to follow up on everything that the standard specifies. Like always on the C and C++ community, "works on my compiler" and "what the standard states about it" is not the same.
- theamk 7y agoNo, those compilers would likely reject it, if I had activated c17 mode. But I did not -- so it worked. This is a real power of C and C++ -- each file gets its own mode. That K&R library you made in ancient time? C++98 classes? All still works and links to the modern stuff. You can be sure that whatever code you wrote today would still be usable, possibly with minor modifications, 20 years later. Sure, the compiler names and build systems will change, but the code would work.
- pjmlp 7y agoWell, from that point of view, it is also the real power of Cobol, Fortran, RPG, NEWP, Java, C#, Delphi.