Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: GCC vs Clang Date: Mon, 25 Jul 2016 16:00:12 -0700 Organization: None to speak of Lines: 45 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx02.eternal-september.org; posting-host="945944de09706c9b4e29b53c9d2efdc2"; logging-data="25839"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+16JcVH/RtuD8wKjECSkS4" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:XLJa3aPq3gwVQtcDx7WTjCyqsdE= sha1:Kk4aoypY9kgc0l2ZeVhMCMVENOg= Xref: csiph.com comp.lang.c:91068 supercat@casperkitty.com writes: > On Monday, July 25, 2016 at 9:57:28 AM UTC-5, David Brown wrote: >> I have no idea what /you/ are supposed to know about. I /do/ know that >> most OS's include assemblers, linkers, libraries, and headers (and >> usually compilers too) as part of their basic packaging - Windows is >> fairly unique in not doing so. I also know that some compiler >> manufacturers - gcc and clang being prime examples - make compilers, not >> development suites or even complete C implementations. > > What other non-Unix microcomputer operating systems have you looked at? > I would consider Unix the oddball in that regard rather than Windows, at > least in the microcomputer arena. What other non-Unix microcomputer operating systems are there? I know there are a few non-Unix non-Windows operating systems, but none of them are particularly common. > I'm also puzzled by why people don't think the runtime library should > bundled with the compiler; for things like file I/O, a compiler that > targets a particular OS should supply a library that interfaces to the > underlying I/O mechanisms of the underlying platform in language-agnostic > fashion. There should be no problem using the same OS to run some C > source programs that expect "long" to be 32 bits and others that expect > it to be 64 bits, provided that each program is processed using a bundled > compiler and library configured for its requirements. Having programs > invoke the OS "printf" functions rather than one that's bundled at build > time requires that all programs using that function must use the same size > of "long"; in the days when a 64K machine was considered "big", having a > compiled program share the OS printf routine may have been advantageous, > but such advantages have dwindled to nothing as machines have gotten larger. There's nothing fundamentally wrong with bundling a runtime library with a compiler, but there are advantages to distributing them separately. For example, even if I didn't have a compiler installed on my system, I'd still be able to run dynamically linked executables that were built elsewhere. Someone who distributes an *application* doesn't have to distribute the C runtime library along with it, they can just assume that it's present, whether the user has a compiler or not. (The Linux distribution I use has gcc preinstalled, but others might not.) -- Keith Thompson (The_Other_Keith) kst-u@mib.org Working, but not speaking, for JetHead Development, Inc. "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"