Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #60611 > unrolled thread

Getting Started with C; Terminal does not compile my file

Started byAlla _ <modelling.data@gmail.com>
First post2015-04-21 00:31 -0700
Last post2015-04-26 14:53 -0700
Articles 20 on this page of 42 — 14 participants

Back to article view | Back to comp.lang.c


Contents

  Getting Started with C; Terminal does not compile my file Alla _ <modelling.data@gmail.com> - 2015-04-21 00:31 -0700
    Re: Getting Started with C; Terminal does not compile my file Noob <root@127.0.0.1> - 2015-04-21 11:38 +0200
    Re: Getting Started with C; Terminal does not compile my file Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-04-21 11:12 +0100
    Re: Getting Started with C; Terminal does not compile my file Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-04-21 06:21 -0700
      Re: Getting Started with C; Terminal does not compile my file Greg Martin <greg.at.softsprocket@dot.com> - 2015-04-21 13:35 +0000
      Re: Getting Started with C; Terminal does not compile my file gazelle@shell.xmission.com (Kenny McCormack) - 2015-04-21 13:38 +0000
      Re: Getting Started with C; Terminal does not compile my file Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-04-21 14:44 +0100
      Re: Getting Started with C; Terminal does not compile my file Keith Thompson <kst-u@mib.org> - 2015-04-21 08:45 -0700
        Re: Getting Started with C; Terminal does not compile my file Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-04-22 05:35 -0700
          Re: Getting Started with C; Terminal does not compile my file Keith Thompson <kst-u@mib.org> - 2015-04-22 10:20 -0700
          Re: Getting Started with C; Terminal does not compile my file Keith Thompson <kst-u@mib.org> - 2015-04-22 10:17 -0700
            Re: Getting Started with C; Terminal does not compile my file Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-04-22 12:56 -0700
              Re: Getting Started with C; Terminal does not compile my file Keith Thompson <kst-u@mib.org> - 2015-04-22 13:28 -0700
                Re: Getting Started with C; Terminal does not compile my file Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-04-22 14:23 -0700
                  Re: Getting Started with C; Terminal does not compile my file Bartc <bc@freeuk.com> - 2015-04-22 22:39 +0100
                    Re: Getting Started with C; Terminal does not compile my file gazelle@shell.xmission.com (Kenny McCormack) - 2015-04-22 21:45 +0000
                      Re: Getting Started with C; Terminal does not compile my file Bartc <bc@freeuk.com> - 2015-04-23 01:28 +0100
                    Re: Getting Started with C; Terminal does not compile my file David Brown <david.brown@hesbynett.no> - 2015-04-23 09:30 +0200
                      Re: Getting Started with C; Terminal does not compile my file Melzzzzz <mel@zzzzz.com> - 2015-04-23 10:38 +0200
                        Re: Getting Started with C; Terminal does not compile my file David Brown <david.brown@hesbynett.no> - 2015-04-23 13:44 +0200
                  Re: Getting Started with C; Terminal does not compile my file Keith Thompson <kst-u@mib.org> - 2015-04-22 18:15 -0700
                  Re: Getting Started with C; Terminal does not compile my file David Brown <david.brown@hesbynett.no> - 2015-04-23 09:33 +0200
                    Re: Getting Started with C; Terminal does not compile my file Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-04-23 02:52 -0700
                      Re: Getting Started with C; Terminal does not compile my file David Brown <david.brown@hesbynett.no> - 2015-04-23 13:52 +0200
                        Re: Getting Started with C; Terminal does not compile my file Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-04-23 05:21 -0700
                          Re: Getting Started with C; Terminal does not compile my file gazelle@shell.xmission.com (Kenny McCormack) - 2015-04-23 12:34 +0000
                          Re: Getting Started with C; Terminal does not compile my file Melzzzzz <mel@zzzzz.com> - 2015-04-23 15:15 +0200
                            Re: Getting Started with C; Terminal does not compile my file gazelle@shell.xmission.com (Kenny McCormack) - 2015-04-23 13:24 +0000
                              Re: Getting Started with C; Terminal does not compile my file Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-04-23 06:42 -0700
                          Re: Getting Started with C; Terminal does not compile my file Ben Bacarisse <ben.lists@bsb.me.uk> - 2015-04-23 14:58 +0100
                          Re: Getting Started with C; Terminal does not compile my file David Brown <david.brown@hesbynett.no> - 2015-04-23 16:07 +0200
                            Re: Getting Started with C; Terminal does not compile my file Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-04-23 07:41 -0700
                              Re: Getting Started with C; Terminal does not compile my file David Brown <david.brown@hesbynett.no> - 2015-04-23 17:28 +0200
                        Re: Getting Started with C; Terminal does not compile my file gazelle@shell.xmission.com (Kenny McCormack) - 2015-04-23 12:36 +0000
                          Re: Getting Started with C; Terminal does not compile my file David Brown <david.brown@hesbynett.no> - 2015-04-23 15:50 +0200
                      Re: Getting Started with C; Terminal does not compile my file raltbos@xs4all.nl (Richard Bos) - 2015-04-25 10:23 +0000
    Re: Getting Started with C; Terminal does not compile my file Greg Martin <greg.at.softsprocket@dot.com> - 2015-04-21 13:37 +0000
    Re: Getting Started with C; Terminal does not compile my file Xcott Craver <xcottcraver@gmail.com> - 2015-04-21 06:53 -0700
    Re: Getting Started with C; Terminal does not compile my file Alla _ <modelling.data@gmail.com> - 2015-04-21 07:43 -0700
    Re: Getting Started with C; Terminal does not compile my file G G <gdotone@gmail.com> - 2015-04-26 09:15 -0700
      Re: Getting Started with C; Terminal does not compile my file Keith Thompson <kst-u@mib.org> - 2015-04-26 12:43 -0700
        Re: Getting Started with C; Terminal does not compile my file G G <gdotone@gmail.com> - 2015-04-26 14:53 -0700

Page 2 of 3 — ← Prev page 1 [2] 3  Next page →


#60835

FromKeith Thompson <kst-u@mib.org>
Date2015-04-22 18:15 -0700
Message-ID<874mo7k5lu.fsf@kst-u.example.com>
In reply to#60797
Malcolm McLean <malcolm.mclean5@btinternet.com> writes:
> On Wednesday, April 22, 2015 at 9:29:00 PM UTC+1, Keith Thompson wrote:
>> Malcolm McLean <malcolm.mclean5@btinternet.com> 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  <http://www.ghoti.net/~kst>
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"

[toc] | [prev] | [next] | [standalone]


#60844

FromDavid Brown <david.brown@hesbynett.no>
Date2015-04-23 09:33 +0200
Message-ID<mha76m$4in$1@dont-email.me>
In reply to#60797
On 22/04/15 23:23, Malcolm McLean wrote:
> On Wednesday, April 22, 2015 at 9:29:00 PM UTC+1, Keith Thompson
> wrote:
>> Malcolm McLean <malcolm.mclean5@btinternet.com> 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.

This sounds like your Makefile has problems, rather than the IDE or the
compiler.  It's the kind of thing that happens when someone takes an
old, complicated Makefile and thinks "make -j" will run faster now that
they have a multi-core PC, without understanding how the build process
works.

> 
> 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.

That makes absolutely no sense at all.

> 
> 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.

[toc] | [prev] | [next] | [standalone]


#60856

FromMalcolm McLean <malcolm.mclean5@btinternet.com>
Date2015-04-23 02:52 -0700
Message-ID<a74c0189-59bd-4176-81a2-370d2d7bd32a@googlegroups.com>
In reply to#60844
On Thursday, April 23, 2015 at 8:33:46 AM UTC+1, David Brown wrote:
> On 22/04/15 23:23, Malcolm McLean wrote:
>  
> This sounds like your Makefile has problems, rather than the IDE or the
> compiler.  It's the kind of thing that happens when someone takes an
> old, complicated Makefile and thinks "make -j" will run faster now that
> they have a multi-core PC, without understanding how the build process
> works.
> 
> > 
> > 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.
> 
> That makes absolutely no sense at all.
> 
In French I can say "I will go to town tomorrow?" and any French person will
understand. But if I try to say "I might go to town tomorrow" or I try to
put a nuance on it like, "I shall be going to town tomorrow" then I've some
idea how to form the subjective, but I'm not confident with it, I'll
probably make a mistake.
In English of course, there's no issue. That's my first language.

[toc] | [prev] | [next] | [standalone]


#60875

FromDavid Brown <david.brown@hesbynett.no>
Date2015-04-23 13:52 +0200
Message-ID<mhamb4$pmd$1@dont-email.me>
In reply to#60856
On 23/04/15 11:52, Malcolm McLean wrote:
> On Thursday, April 23, 2015 at 8:33:46 AM UTC+1, David Brown wrote:
>> On 22/04/15 23:23, Malcolm McLean wrote:
>>  
>> This sounds like your Makefile has problems, rather than the IDE or the
>> compiler.  It's the kind of thing that happens when someone takes an
>> old, complicated Makefile and thinks "make -j" will run faster now that
>> they have a multi-core PC, without understanding how the build process
>> works.
>>
>>>
>>> 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.
>>
>> That makes absolutely no sense at all.
>>
> In French I can say "I will go to town tomorrow?" and any French person will
> understand. But if I try to say "I might go to town tomorrow" or I try to
> put a nuance on it like, "I shall be going to town tomorrow" then I've some
> idea how to form the subjective, but I'm not confident with it, I'll
> probably make a mistake.
> In English of course, there's no issue. That's my first language.
> 

I can well believe that you speak better English than French.  That's
not the issue!

What we can't comprehend is how you see trouble with your build system,
and conclude that this means llvm was originally written for Objective C
and then had C++ support added.  As well as being completely incorrect
factually, it has no more logic than Sir Bedevere in Monty Python.  The
non-sequitor anecdote about French just adds to the confusion.

You first wrote:

"So my conclusion is that it's because C++ was an afterthought, and
basically it's intended to compile Objective C. I might be wrong."

You were told that you /were/ wrong.

The normal response is to say, "okay, thanks for correcting me" - rather
than to embarrass yourself with nonsense excuses.

[toc] | [prev] | [next] | [standalone]


#60878

FromMalcolm McLean <malcolm.mclean5@btinternet.com>
Date2015-04-23 05:21 -0700
Message-ID<ffd45675-ab3d-4986-87b0-d6ad766515a3@googlegroups.com>
In reply to#60875
On Thursday, April 23, 2015 at 12:52:08 PM UTC+1, David Brown wrote:
> On 23/04/15 11:52, Malcolm McLean wrote:
>
> "So my conclusion is that it's because C++ was an afterthought, and
> basically it's intended to compile Objective C. I might be wrong."
> 
> You were told that you /were/ wrong.
> 
Someone who has actually developed clang is qualified to answer that question.
They might be able to tell me why clang is crashing, and it could have nothing
to do with the fact that C++ is a second language for it - maybe a similar
codebase in Objective C would have the same effect.
(Actually the code does have quite a few Objective C files in it, it's basically
an Objective C system and it's hard to communicate with the OS without,
but it always seems to crash whilst compiling C++).

But if you can't tell me what the source of the bug is, you can't rule anything
out.

[toc] | [prev] | [next] | [standalone]


#60880

Fromgazelle@shell.xmission.com (Kenny McCormack)
Date2015-04-23 12:34 +0000
Message-ID<mhaos0$891$1@news.xmission.com>
In reply to#60878
In article <ffd45675-ab3d-4986-87b0-d6ad766515a3@googlegroups.com>,
Malcolm McLean  <malcolm.mclean5@btinternet.com> wrote:
>On Thursday, April 23, 2015 at 12:52:08 PM UTC+1, David Brown wrote:
>> On 23/04/15 11:52, Malcolm McLean wrote:
>>
>> "So my conclusion is that it's because C++ was an afterthought, and
>> basically it's intended to compile Objective C. I might be wrong."
>> 
>> You were told that you /were/ wrong.
>> 
>Someone who has actually developed clang is qualified to answer that question.

This is CLC, where people in general, and 2 "regs" in particular", have an
ongoing problem separating their opinions from facts.

They also think that because you were "told" something by one of them (and
we know who we're talking about here), that you will, automatically, treat
said telling as an oracle from the gods.

These people have obviously not had much real world experience...

-- 
(The Republican mind, in a nutshell)
You believe things that are incomprehensible, inconsistent, impossible
because we have commanded you to believe them; go then and do what is
unjust because we command it. Such people show admirable reasoning. Truly,
whoever is able to make you absurd is able to make you unjust. If the
God-given understanding of your mind does not resist a demand to believe
what is impossible, then you will not resist a demand to do wrong to that
God-given sense of justice in your heart. As soon as one faculty of your
soul has been dominated, other faculties will follow as well. And from this
derives all those crimes of religion which have overrun the world.

(Alternative condensed translation)
"Those who can make you believe absurdities, can make you commit atrocities".

[toc] | [prev] | [next] | [standalone]


#60884

FromMelzzzzz <mel@zzzzz.com>
Date2015-04-23 15:15 +0200
Message-ID<20150423151515.09b99e35@maxa-pc>
In reply to#60878
On Thu, 23 Apr 2015 05:21:31 -0700 (PDT)
Malcolm McLean <malcolm.mclean5@btinternet.com> wrote:

> On Thursday, April 23, 2015 at 12:52:08 PM UTC+1, David Brown wrote:
> > On 23/04/15 11:52, Malcolm McLean wrote:
> >
> > "So my conclusion is that it's because C++ was an afterthought, and
> > basically it's intended to compile Objective C. I might be wrong."
> > 
> > You were told that you /were/ wrong.
> > 
> Someone who has actually developed clang is qualified to answer that
> question. They might be able to tell me why clang is crashing, and it
> could have nothing to do with the fact that C++ is a second language
> for it - maybe a similar codebase in Objective C would have the same
> effect. (Actually the code does have quite a few Objective C files in
> it, it's basically an Objective C system and it's hard to communicate
> with the OS without, but it always seems to crash whilst compiling
> C++).
> 
> But if you can't tell me what the source of the bug is, you can't
> rule anything out.
> 

Hm, it seems to me that llvm is written in C++...
Show one C++ file where it crashes. I have 3.6 and development version.

[toc] | [prev] | [next] | [standalone]


#60887

Fromgazelle@shell.xmission.com (Kenny McCormack)
Date2015-04-23 13:24 +0000
Message-ID<mharr7$9r5$1@news.xmission.com>
In reply to#60884
In article <20150423151515.09b99e35@maxa-pc>, Melzzzzz  <mel@zzzzz.com> wrote:
...
>> But if you can't tell me what the source of the bug is, you can't
>> rule anything out.
>
>Hm, it seems to me that llvm is written in C++...
>Show one C++ file where it crashes. I have 3.6 and development version.

That sort of "Show me or I will go about claiming that you are a f***wit"
CLC attitude doesn't work in this case, because Malcolm has already
stipulated that the error is somewhat random (those kinds of bugs are
always the hard ones...) and that rebooting the IDE fixes it.

Until the next time it happens...

-- 
b w r w g y b r y b

[toc] | [prev] | [next] | [standalone]


#60888

FromMalcolm McLean <malcolm.mclean5@btinternet.com>
Date2015-04-23 06:42 -0700
Message-ID<4a7ee78e-c268-4b7d-a719-c53d0832e665@googlegroups.com>
In reply to#60887
On Thursday, April 23, 2015 at 2:25:04 PM UTC+1, Kenny McCormack wrote:
> In article <20150423151515.09b99e35@maxa-pc>, Melzzzzz  <mel@zzzzz.com> wrote:
>
> >Hm, it seems to me that llvm is written in C++...
> >Show one C++ file where it crashes. I have 3.6 and development version.
> 
> That sort of "Show me or I will go about claiming that you are a f***wit"
> CLC attitude doesn't work in this case, because Malcolm has already
> stipulated that the error is somewhat random (those kinds of bugs are
> always the hard ones...) and that rebooting the IDE fixes it.
> 
> Until the next time it happens...
> 
My colleague is one of those people who, whenever a new library or version of C++
comes out says, "Oh, this is great, we must use this". I'm far more conservative.
However he's a great guy and I don't try to insist on doing things my way.

However when it started crashing, my instant reaction was to say "told you so".
However humiliatingly the crashes are usually in my C++ files which call his classes.
Not always, I have see it crash on his. But normally it's my code that seems to 
choke it.

[toc] | [prev] | [next] | [standalone]


#60891

FromBen Bacarisse <ben.lists@bsb.me.uk>
Date2015-04-23 14:58 +0100
Message-ID<87h9s76j5r.fsf@bsb.me.uk>
In reply to#60878
Malcolm McLean <malcolm.mclean5@btinternet.com> writes:

> On Thursday, April 23, 2015 at 12:52:08 PM UTC+1, David Brown wrote:
>> On 23/04/15 11:52, Malcolm McLean wrote:
>>
>> "So my conclusion is that it's because C++ was an afterthought, and
>> basically it's intended to compile Objective C. I might be wrong."
>> 
>> You were told that you /were/ wrong.
>> 
> Someone who has actually developed clang is qualified to answer that question.
> They might be able to tell me why clang is crashing, and it could have nothing
> to do with the fact that C++ is a second language for it - maybe a similar
> codebase in Objective C would have the same effect.

This is some nifty footwork!  Your original claim was to advise the OP
not to use clang as a C compiler because it basically an objective-c
compiler and therefore a bit strange.  Have you found out yet that clang
was originally a C compiler?  Whatever problem you are having with it,
your analogy with second languages does not apply to your original poor
advice.

-- 
Ben.

[toc] | [prev] | [next] | [standalone]


#60892

FromDavid Brown <david.brown@hesbynett.no>
Date2015-04-23 16:07 +0200
Message-ID<mhau8h$pgb$1@dont-email.me>
In reply to#60878
On 23/04/15 14:21, Malcolm McLean wrote:
> On Thursday, April 23, 2015 at 12:52:08 PM UTC+1, David Brown wrote:
>> On 23/04/15 11:52, Malcolm McLean wrote:
>>
>> "So my conclusion is that it's because C++ was an afterthought, and
>> basically it's intended to compile Objective C. I might be wrong."
>>
>> You were told that you /were/ wrong.
>>
> Someone who has actually developed clang is qualified to answer that question.

Someone who has had a brief look at the web page, or even the wikipedia
page, is qualified to answer that question.

<http://clang.llvm.org/>

The "clang introduction" link explains that clang was a new /C/
front-end for llvm (to replace the original gcc front-end used earlier
with llvm, and still used for Ada, Fortran, etc.).  The plan was to
support Objective C and C++ (and Objective C++, I think, though I don't
believe it sees much use) once the C support was in place.

I am sure a clang developer could give you more details, but I believe
that's enough for now.

> They might be able to tell me why clang is crashing, and it could have nothing
> to do with the fact that C++ is a second language for it - maybe a similar
> codebase in Objective C would have the same effect.

C++ is arguably a "second language" for clang, but it is certainly not a
"second-class" language - it is the main focus of the clang development
effort.  And your idea that clang is an Objective C compiler with some
C++ tagged on is completely wrong.

If your reasoning for this idea were that Apple have been a major backer
and contributor to clang from early on, and Apple like Objective C, then
I could have understood it (though it would still be wrong).  It's the
"clang crashes with C++, /therefore/ it is an Objective C compiler with
added C++" that I can't fathom.

It is quite possible that clang is crashing, and there could be many
reasons for it.  Clang is not /my/ program - I can't tell you its
quality.  But I /can/ tell you that the cause of the crash cannot be
"because it is an Objective C compiler with C++ support added", since
that's not true.

And as I say, from what little you have said about the real problem, I
would first suspect the build process rather than the compiler or your
source code (though the general rule is to suspect the source code
rather than the compiler).

> (Actually the code does have quite a few Objective C files in it, it's basically
> an Objective C system and it's hard to communicate with the OS without,
> but it always seems to crash whilst compiling C++).
> 
> But if you can't tell me what the source of the bug is, you can't rule anything
> out.
> 

I can certainly put your incorrect ideas about the history of the
compiler as pretty low down in the list of likely causes.

[toc] | [prev] | [next] | [standalone]


#60899

FromMalcolm McLean <malcolm.mclean5@btinternet.com>
Date2015-04-23 07:41 -0700
Message-ID<4d24e118-86f4-4bc1-be58-694067011c18@googlegroups.com>
In reply to#60892
On Thursday, April 23, 2015 at 3:07:18 PM UTC+1, David Brown wrote:
> On 23/04/15 14:21, Malcolm McLean wrote:
>
> If your reasoning for this idea were that Apple have been a major backer
> and contributor to clang from early on, and Apple like Objective C, then
> I could have understood it (though it would still be wrong).  It's the
> "clang crashes with C++, /therefore/ it is an Objective C compiler with
> added C++" that I can't fathom.
> 
Love and attention isn't going into the C++ portions of the clang code.

Most likely underlying reason it's crashing on fairly new-fangled C++.

Of course it's only a guess.

[toc] | [prev] | [next] | [standalone]


#60905

FromDavid Brown <david.brown@hesbynett.no>
Date2015-04-23 17:28 +0200
Message-ID<mhb30i$ce7$1@dont-email.me>
In reply to#60899
On 23/04/15 16:41, Malcolm McLean wrote:
> On Thursday, April 23, 2015 at 3:07:18 PM UTC+1, David Brown wrote:
>> On 23/04/15 14:21, Malcolm McLean wrote:
>>
>> If your reasoning for this idea were that Apple have been a major backer
>> and contributor to clang from early on, and Apple like Objective C, then
>> I could have understood it (though it would still be wrong).  It's the
>> "clang crashes with C++, /therefore/ it is an Objective C compiler with
>> added C++" that I can't fathom.
>>
> Love and attention isn't going into the C++ portions of the clang code.

Where does this information come from?

The clang team have made a great deal of effort on the C++ side, to
support C++14 and to generate better code.  The Objective C work is
relatively stable since the language is pretty stable.

> 
> Most likely underlying reason it's crashing on fairly new-fangled C++.

New features in the compiler are always a good starting point for
suspicion (just as new features are in any program) - my point is that
C++ is their main focus for development, and it is getting more than its
fair share of "love and attention".  But the newest features will also
be the ones least tested in the field.

> 
> Of course it's only a guess.
> 

This time it is a guess with a rational justification.

Once you figure it all out and find the problem, be sure to let us know.

[toc] | [prev] | [next] | [standalone]


#60881

Fromgazelle@shell.xmission.com (Kenny McCormack)
Date2015-04-23 12:36 +0000
Message-ID<mhap19$891$2@news.xmission.com>
In reply to#60875
In article <mhamb4$pmd$1@dont-email.me>,
David Brown  <david.brown@hesbynett.no> wrote:
...
>The normal response is to say, "okay, thanks for correcting me" - rather
>than to embarrass yourself with nonsense excuses.

Let me guess.  You grew up in an English boarding school.

-- 
"There's no chance that the iPhone is going to get any significant market share. No chance." - Steve Ballmer

[toc] | [prev] | [next] | [standalone]


#60890

FromDavid Brown <david.brown@hesbynett.no>
Date2015-04-23 15:50 +0200
Message-ID<mhat9o$ld6$1@dont-email.me>
In reply to#60881
On 23/04/15 14:36, Kenny McCormack wrote:
> In article <mhamb4$pmd$1@dont-email.me>,
> David Brown  <david.brown@hesbynett.no> wrote:
> ...
>> The normal response is to say, "okay, thanks for correcting me" - rather
>> than to embarrass yourself with nonsense excuses.
> 
> Let me guess.  You grew up in an English boarding school.
> 

No.

But I do understand the expression "when you are in a hole, stop
digging".  And when I get things completely and utterly wrong (as I did
in a recent thread here), I prefer to say so rather than giving wild
excuses and changing the subject.

[toc] | [prev] | [next] | [standalone]


#61063

Fromraltbos@xs4all.nl (Richard Bos)
Date2015-04-25 10:23 +0000
Message-ID<553b6ac5.9863187@news.xs4all.nl>
In reply to#60856
Malcolm McLean <malcolm.mclean5@btinternet.com> wrote:

> On Thursday, April 23, 2015 at 8:33:46 AM UTC+1, David Brown wrote:
> > On 22/04/15 23:23, Malcolm McLean wrote:
> >  
> > > 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.
> > 
> > That makes absolutely no sense at all.
> > 
> In French I can say "I will go to town tomorrow?" and any French person will
> understand. But if I try to say "I might go to town tomorrow" or I try to
> put a nuance on it like, "I shall be going to town tomorrow" then I've some
> idea how to form the subjective, but I'm not confident with it, I'll
> probably make a mistake.
> In English of course, there's no issue. That's my first language.

That analogy makes no sense unless your language knowledge was directly
programmed in, not learned through experience. So unless you're willing
to admit that that buffer test is you failing the Turing Test...

Richard

[toc] | [prev] | [next] | [standalone]


#60635

FromGreg Martin <greg.at.softsprocket@dot.com>
Date2015-04-21 13:37 +0000
Message-ID<PosZw.340672$jx4.317929@fx27.iad>
In reply to#60611
On 2015-04-21, Alla _ <modelling.data@gmail.com> wrote:
> Hello!
>
> I would be grateful for the help. 
>
> I am trying to perform first task from the textbook (simplest task on creating first short program in C; following the example from the book, which is the same at Howstuffworks.com):
>
> Xcode works (at least types and highlights words in program), Terminal opens and partially works, but does not execute compile command. 
>
> I have tried different options. Please, take a look at the steps; what is my mistake?
>
> Mac OS X 10.7.5
>
> Xcode command:
>
> #include <studio.h>
>
>
>
> int main (void)
>
> {
>
>     printf ("Programming is fun.\n");
>
>     printf ("And programming in C is even more fun.\n");
>
>     
>
>     return 0;
>
> }
>
> Then Terminal:
>
> 128-68-198-68:GetStarted Alla$ open CS50PSET1.c
> 128-68-198-68:GetStarted Alla$ gcc CS50PSET1.c
> -bash: gcc: command not found
> 128-68-198-68:GetStarted Alla$ cc CS50PSET1.c
> -bash: cc: command not found
> 128-68-198-68:GetStarted Alla$ gcc CS50PSET1.c -o CS50PSET1
> -bash: gcc: command not found
> 128-68-198-68:GetStarted Alla$ gcc -o CS50PSET1.c
> -bash: gcc: command not found
> 128-68-198-68:GetStarted Alla$ gcc /Users/Alla/GetStarted/CS50PSET1.c 
> -bash: gcc: command not found
> 128-68-198-68:GetStarted Alla$ 
>
> Thank you! 

At the command line you can try:
xcode-select --install

It's been a while since I've used a mac but I think it installs the
commandline tools.

-- 
http://www.softsprocket.com

[toc] | [prev] | [next] | [standalone]


#60638

FromXcott Craver <xcottcraver@gmail.com>
Date2015-04-21 06:53 -0700
Message-ID<fda1c775-82d9-4244-9614-b9b67a4228e5@googlegroups.com>
In reply to#60611
On Tuesday, April 21, 2015 at 3:31:45 AM UTC-4, Alla _ wrote:
>
> 128-68-198-68:GetStarted Alla$ gcc CS50PSET1.c
> -bash: gcc: command not found

Hi,


In some versions of XCode you must install the command line tools (gcc) 
yourself.  On the systems in my lab, I had to go to Preferences in the XCode
menu, select "Downloads" and download the command-line tools.  See:

http://stackoverflow.com/questions/9353444/how-to-use-install-gcc-on-mac-os-x-10-8-xcode-4-4

However, XCode seems to change the way it does things with astonishing
regularity, including the layout of these windows.  No matter what, you
should be able to install the command tools through Xcode, rather than
through some 3rd-party software.

--S

[toc] | [prev] | [next] | [standalone]


#60641

FromAlla _ <modelling.data@gmail.com>
Date2015-04-21 07:43 -0700
Message-ID<38dca9ff-f811-4071-a4c8-09cbaa8bebe4@googlegroups.com>
In reply to#60611
Dear all,

Thank you very much for your valuable feedbacks! These are very important for a beginner like me. 
I have figured out the problem: indeed, I had to install Command Line Tools, gcc works now. 

Thank you! 

[toc] | [prev] | [next] | [standalone]


#61148

FromG G <gdotone@gmail.com>
Date2015-04-26 09:15 -0700
Message-ID<f966b65a-ad73-4fea-bc13-2dbae44b8ac1@googlegroups.com>
In reply to#60611

http://www.tutorialspoint.com/unix_terminal_online.php

[toc] | [prev] | [next] | [standalone]


Page 2 of 3 — ← Prev page 1 [2] 3  Next page →

Back to top | Article view | comp.lang.c


csiph-web