9 ms·
I'm confused but didn't Apple just do this for two operating systems. And then moved their entire OSX and iOS development community as well ?
by taligent 14y ago
I'm confused but didn't Apple just do this for two operating systems.
And then moved their entire OSX and iOS development community as well ?
- hosay123 14y agoApple manufacture consumer entertainment devices that are neither safety critical in nature nor difficult to field test. Think more along the lines of Boeing, Northrop Grumman or Raytheon.
- wooster 14y agoI'd be surprised and disappointed if those companies were using GCC to compile avionics code written in C++.
- 0x0 14y agoReally, why? What should they have been using - at least just a few years ago before LLVM became mainstream?
- frisco 14y agoProbably icc (Intel's C++ compiler), MSVC++, or one of IBM's (i.e., xlcc).
- 0x0 14y agoAre they really that much better? I remember hitting a bunch of incorrectly generated code for MSVC++ at least back in the 6.0 days. Like, the disassembly revealed dangerously incorrect code.
- frisco 14y agoI don't know much about MSVC++, but Intel's compilers are widely considered the most advanced C++ compilers, as long as you stick with Intel hardware. There was some controversy over it generating bad assembly when targeting AMD cores, but this is a non-issue for companies like Boeing and Raytheon, who will be using custom hardware anyway.
- 0x0 14y agoThe controversy was that it generated a CPUID check for "GenuineIntel" at runtime, and fell back to extremely poorly generated code (like, 386-level, almost 286-level style) for all other CPUs, as far as I remember. Borderline intentional sabotage against AMD, because they can obviously do better and I don't believe they are unaware of the capabilities of AMD CPUs. (edit: And they should probably be checking for features instead of vendor IDs anyways. It's like checking for Firefox in the user-agent and sending animated GIFs instead of WebGL if you're on Chrome) Here's some more info: http://en.gentoo-wiki.com/wiki/Intel_C%2B%2B_Compiler#Uncripple_icc_on_AMD_CPUs http://en.gentoo-wiki.com/wiki/Intel_C%2B%2B_Compiler#Uncrip...
- gillianseed 14y agoIntel is widely known to produce the most _optimized_ code for their own cpu range. That doesn't mean that they are the 'most advanced c++ compilers'. It was generating bad code for anything that wasn't Intel.
- gillianseed 14y agoICC is a proprietary compiler which not only focuses it's optimizations on their own cpu range but also have a history of deliberately generating subpar codepaths for non-Intel cpu's. MVSC is Windows only proprietary compiler and certainly hasn't had stellar C++ standard support although they are trying to rectify that with their recent 'Go native' push. I have had no experience with IBM's XLCC compilers though, maybe someone else has?
- wooster 14y agocwzwarich's comment above covers it pretty well.
- gillianseed 14y agoWhat else do you propose they should be using?
- jfb 14y agoDoes your back hurt from moving those goalposts?
- hosay123 14y agoAre you objecting to the removal of "overpriced" (irrelevant opinion) or the addition of specific examples?
- jfb 14y agoYou made a claim ("It would take an immensely ballsy release engineer to approve switching from GCC to clang even for a modestly sized, mature codebase"); people pointed out counter-examples (Apple and Google); you move the goalposts. Would it have killed you to admit that you were wrong in the post as written?
- hosay123 14y agoThere is little motivation in commenting unless in the process I can enhance or validate my understanding. Often this naturally means arguing details until out of breath, or my diatribe is so sufficiently beaten back that I'm too exasperated to continue – at which point the topic will sink in, until reiterated at some later date in some later argument – with a level of belief that cannot be attained unless all alternatives have first been eliminated. I'd much rather die fierce yet wrong than live a life shrouded in vagueness.
- tjr 14y agoI was writing some networking code for an avionics project in C, and stumbled upon a bug in GCC that was causing structures to be packed incorrectly in memory. The bug had long been fixed in newer versions of GCC, but it's so time-consuming and money-consuming to approve new compilers for avionics use that we just had to work around the bug. If upgrading from one version of GCC to another is a big deal, I can only imagine how excited avionics stakeholders wouldn't be to switch compilers altogether. It may happen eventually, but then again... it may not. Just so long as they are happy to use some GCC build from 2002 or whatever, and just so long as there's no pressing need to use something else, why should they take on the effort and expense of switching?
- cwzwarich 14y agoThere is a whole industry of people providing operating systems and compilers for high assurance embedded development, led by companies like Green Hill Software. Nobody would ship a safety critical embedded project using either GCC or Clang. At the highest levels of safety, the DO-178B standard for aviations systems requires compilers to generate code in a way that has a fixed structural relationship between source and output patterns, where each pattern is independently verified, so that every output instruction is directly traceable to a source instruction. All other code generated by the compiler has to be manually verified. This eliminates the use of most of the optimization techniques found in modern compilers. Also, the emphasis on Worst-Case Execution Time (WCET) verification means that performance improvements only matter if your WCET estimates can incorporate them.
- foobarqux 14y ago> Nobody would ship a safety critical embedded project using either GCC or Clang. They would and they do. I'm not sure what the second paragraph is trying to say. GCC (and Clang) optimizations can be turned off selectively or entirely altogether. DO-178B doesn't prohibit optimizations in general.
- orionblastar 14y agoBack in 1996-1997 I was a federal contractor working as a software consultant and analyst using several different systems for logistics and provisioning for the US Army to downsize a base to a different state. We used different operating systems and different databases and programming languages to create a redundant system that solved the same problem or generated the same report. We would have at least three programs running with three different technologies and if the reports were all the same, the system was in good shape, but if one of the reports differed somehow we knew we had to check and fix something. We did use SunOS/Solaris, HPUX, Linux (Slakware IIRC), DOS/Windows 3.0, Windows 95, Windows NT, etc. In some cases there were C programs using the native C compiler with whatever Unix system that was in use, and in the case of Windows or DOS we used whatever language or software was available. I worked in Clipper, DBase, Oracle PL/SQL, SQL Server, MS-Access, and sometimes even flat text files downloaded from mainframes or FTP sites on the Military network that needed converting to different databases. As a federal contractor I was limited in what I could do, for example my PC did not have a CD drive and they would not allow ODBC drivers to be installed. I did not have administrative access but instead access to a maintenance account that others shared to work with databases that was limited in many ways. My point is you work with whatever they give you to work with, you may be limited in what you do, but you use what you have available. So yes you might be limited to GCC on a Linux system and no root access to install CLANG or LLVM.