This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Bug in compiler

I,ve installed the Compiler and I can,t get even the simplest code to compile properely.

Anyone know where the fix for this bug is?

Or is it a limit of the demonstration version?

void main(void)
{ cout << "Hello world!";
}

  • Just to correct my last post before I get abuse:

    "Just curious, but how is C more limited than C++?"

    C++ is (basically) a superset of C

    Embedded C++ is (basically) a subset of C++

    And Embedded C++ is (basically) a superset of C

    So, expressed in terms of facilities:

    C < Embedded C++ < C++

    I said it is more limited purely because it is considered to be lower level, less abstract etc

    So it could be extended to the expression:

    Assembler < C < Embedded C++ < C++

    The extrapolation to "Russian is more limited than German" is clearly wrong.

    But everyone knows that Esperanto is superior to all others ;)

  • NOBODY has "dismissed C++ out of academic principal"

    I think that this is just a paraphrase of:

    NOBODY has ever dismissed goto out of academic principal

  • You started this thread because you didn't understand that a C compiler cannot compile C++ source code - you even called this a "bug"

    The point in mentioning that Embedded C++ doesn't support everything in "full" C++ was just to save you making the same mistake if you try to compile "full" C++ source code with an Embedded C++ compiler.

  • I may have started the thread thinking there was a bug.

    Since then I've been reading manuals and scanning web sites.

    I've been busy and think I've learnt a lot in a short time.

    I now know more about the various programming languages and (contrary to the apparent wish of some posters to this thread) am now working on a project with confidence that it will do what the contract requires.

    For example, I am already communicating with the display and showing text. Moreover, I am using classes.

    I hope that I will continue to learn and as a consequence I can then make and provide balanced opinions in the future.

  • Exactly what has goto with C/C++ to do?

  • So, what tool did you buy or are using the demo version of?

  • "I may have started the thread thinking there was a bug."

    You certainly did!
    And look how stubbornly and vehemently you attacked those who tried to explain to you why it is not a bug, but it perfectly normal and expected behaviour!

    "I now know more about the various programming languages"

    Good.
    Now that you understand, look back at your original dozen posts or so - look how you responded to the people who tried to explain this to you.
    Is it surprising that you got their backs up?

  • Exactly what has goto with C/C++ to do?

    Refer to the 'Using goto in C/C++' debate.

    So many people dismiss the use of it through academic belief and immediately preclude it's potential advantages.

    FYI, I was likening it to the attitude I received concerning C++ on 8051 based embedded systems.

  • Is it surprising that you got their backs up?

    Hmmmm. I might have upset one or two. But WTF. That's life.

    More interesting than that is the evidence of bickering between respondents on this thread (and others).

  • I haven't had the time for a detailed look at the map file, but the summary line from building a simple "Hello, world" example as shown indicates that the total CODE space usage is on the order of 2K...

    A quick glance would be sufficient to spot the following line:

    C:000000H   C:000000H   C:007FFFH   000438H   CODE
    

    Which shows the total code size to be 1080 bytes.

  • So, what tool did you buy or are using the demo version of?

    At the moment I'm considering both the IAR and Ceibo options.

    Currently the limitations of the demonstration versions (of both) are sufficient high to allow me to do the basics.

  • "More interesting than that is the evidence of bickering between respondents on this thread"

    I think if you go to any forum and find any thread that tries to compare different products, languages, styles, or whatever you'll end up with some of that...!

  • I think if you go to any forum and find any thread that tries to compare different products, languages, styles, or whatever you'll end up with some of that...!

    You're probably right with that.

    But what I've witnessed, in the short time I've been here, is that there are one or two people on this forum who seem to go from thread to thread trying to win points over one another.

    I will mention no names. You will probably know who I'm talking about!

    And I got comments about my attitude!

  • I do not give a hoot about your post, the subject of this thread is NOT that printf works in C, which we all know, but C++ on the '51.

    As usual you are commenting on what you would like me to have said, or what you imagine I have said, rather than what I actually have said. If you had the wit to read and understand my post you might be able to make some sort of sensible contribution.

    I'm quite happy for you to criticise anything I write on this forum, but please don't keep muddying the waters by criticising things I haven't written. It wastes even more bandwidth than I already expend trying to get you to stick to the facts.

  • Currently the limitations of the demonstration versions (of both) are sufficient high to allow me to do the basics.

    Which one generates the smallest code, and what processor are you building for?