Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: Getting Started with C; Terminal does not compile my file Date: Wed, 22 Apr 2015 18:15:09 -0700 Organization: None to speak of Lines: 52 Message-ID: <874mo7k5lu.fsf@kst-u.example.com> References: <5d933960-8ebd-47a2-8bd4-cc9de8f77031@googlegroups.com> <96890356-e306-4fa9-bd0c-6d0934205cc7@googlegroups.com> <87k2x5mqnr.fsf@kst-u.example.com> <1f206b33-3556-4d74-871c-ee727e0f276d@googlegroups.com> <87d22wkrpc.fsf@kst-u.example.com> <96804a4a-53af-4a96-ac05-53b5ffd51a34@googlegroups.com> <87d22vkiuz.fsf@kst-u.example.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="9be37d943435275679235b07c7947eef"; logging-data="12387"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/68XDCvrHF1/mJ8xAVWE9S" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:XK/F7OMIia65yUupSI1JZU+0sI4= sha1:OoeKzYfEjBZ0+0xSv83RyeIwOnI= Xref: csiph.com comp.lang.c:60835 Malcolm McLean writes: > On Wednesday, April 22, 2015 at 9:29:00 PM UTC+1, Keith Thompson wrote: >> Malcolm McLean writes: >> > Xcode regularly falls over on our codebase of admittedly rather >> > advanced C++. From the error messages, it appears that the error >> > is in the compiler rather than the IDE, but it's impossible to be sure. >> > >> > Restarting it usually fixes the problem. >> >> It's surprising that a C++ compiler producing an error message for >> "rather advanced C++" is a problem that would be corrected by restarting >> the IDE. But since that's either an IDE issue, a compiler issue, or a >> C++ issue, I won't ask for details. >> > It crashes out on our medium-size codebase. So you shut down the IDE, > and have another go, and usually it works. This happens when you touch > something that needs a non-trivial number of file recompiles. But I > think it's a bug in clang rather than the IDE, because it reports at > fatal error in a given source file and line number. When you look at > it there's nothing wrong with the code. Ok, I have no idea what's going on there (and this isn't the place to track it down). I also have no idea what's "rather advanced" about your C++ code (no, I'm not asking). > So it's what you'd expect if someone had written an Objective C > compiler and then made it compile C++ as well. Just as I can hold > a conversation in French at a pinch, but with lots of mistakes - > it's a second language from me. Your C++ compiler sometimes crashes and you don't know why. Is that really the only basis for your assertion that it must have started out as an Objective-C compiler? Seriously? > If the command "gcc" evokes clang, which seems to be the case, then > we've got a philosophical question here. Are gcc and clang the > same compiler? No, there is no philosophical question. gcc is a compiler system produced by the GNU project. clang is a different compiler system produced by a different group, using LLVM as its back end. They are largely compatible, but very clearly not the same thing. Apparently there's also some interoperability between their respective front end and back ends. For convenience, Mac OSX uses a command with the name "gcc" to invoke the clang compiler, probably because a lot of Makefiles assume that the C compiler command is spelled "gcc". -- 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"