R
raashid bhatt
is there any standards that tell us how c code has to be compiled into
machine code
machine code
is there any standards that tell us how c code has to be compiled into
machine code
code. Often it is not - it is compiled (translated) into a particular
machine's assembly language instead. It could even be compiled into some
completely different language.
- any performance problems are more likely to be a consequence of the
solution (i.e. your program isn't written as efficiently as it might
be) than of the translation.
In any case, correctness is far more important than speed.
[/QUOTE]is there any standards that tell us how c code has to be compiled into
machine code
raashid said:is there any standards that tell us how c code has to be compiled into
machine code
Richard said:Richard Tobin said:
Oh, I'm sorry. Perhaps you could enlighten us with some references?
You'd know /all/ about that.
False dichotomy. You seem to take the foolish approach that speed
doesn't matter at all, and choosing an O(n^2) algorithm when an O(n)
algorithm is available and in fact simpler and clearer doesn't bother
you in the least. Why? Because you've turned "portability" into an
obsession, and nothing else matters.
Richard said:Richard Tobin said:
Oh, I'm sorry. Perhaps you could enlighten us with some references?
Richard Heathfield said:In any case, correctness is far more important than speed.
[/QUOTE]Yes, several in fact..
Oh, I'm sorry. Perhaps you could enlighten us with some references?
Richard Heathfield said:I would have thought that a standard that tells us how C must be compiled
into machine code would be very topical. I am yet to be convinced that
such a standard exists, however. Richard Tobin seems to think that one
does, so I await his reply with interest.
Richard Heathfield said:Richard Tobin said:
Thank you.
It appears to be a 258-page document. Could you possibly help me out by
telling me whereabouts in that document I can find the bit that tells us
how C code has to be compiled into machine code?
It would be fun to be disingenuous, with the punchline being that C
doesn't
have to be compiled into machine code in the first place, and therefore
there can't be a standard telling us it does have to be. But that's not
what I'm getting at here. I am assuming for the purpose of this discussion
that our objective is to compile C code into machine code, and the
question before us is whether any recognised standard exists that tells us
how this must be done.
You have suggested the System V ABI for x86, but I'm doubtful on two
grounds. Firstly, on first glance I can only find the term "machine code"
once in the entire document, and that part didn't seem to have anything to
do with translating C. Perhaps you could set me straight there.
Richard said:Joachim Schmitz said:
Thank you for the reference. I didn't notice anything on that page
about standards for translating C into machine code.
I would have thought that a standard that tells us how C must be
compiled into machine code would be very topical. I am yet to be
convinced that such a standard exists, however. Richard Tobin seems
to think that one does, so I await his reply with interest.
Richard said:Richard Tobin said:
Thank you.
It appears to be a 258-page document. Could you possibly help me out by
telling me whereabouts in that document I can find the bit that tells us
how C code has to be compiled into machine code?
It would be fun to be disingenuous, with the punchline being that C doesn't
have to be compiled into machine code in the first place, and therefore
there can't be a standard telling us it does have to be.
But that's not
what I'm getting at here. I am assuming for the purpose of this discussion
that our objective is to compile C code into machine code, and the
question before us is whether any recognised standard exists that tells us
how this must be done.
You have suggested the System V ABI for x86, but I'm doubtful on two
grounds. Firstly, on first glance I can only find the term "machine code"
once in the entire document,
and that part didn't seem to have anything to
do with translating C. Perhaps you could set me straight there.
Secondly, I see no claim within the document itself to be a standard, and
the frontispiece doesn't bode well:
"Information in this document is subject to change without notice and does
not represent a commitment on the part of The Santa Cruz Operation, Inc."
If it's subject to change without notice, it's hard to see how it can
reasonably be called a standard.
Look Heathfield, if you can't read it's nobody problem but yours;
This is the way those standards are done. We are not speaking about ISO
here, nor about C89...
Richard Heathfield said:Richard Tobin said:
Wrong answers are wrong answers, too. Getting them quicker doesn't make
them righter.
Jacob said:The Linux world runs under the gcc evil empire, since it is gcc
that compiles the linux kernel.
Antoninus Twink said:As usual, Heathfield is playing his pathetic word games.
He is deliberately interpreting "standard" as "ISO standard", even
though it's obvious to every other poster in this thread, and indeed
every reasonable person, that that isn't what the OP meant. He knows
this full well, but will continue to play along telling everyone else
their idiots because they won't play by his silly rules.
Word games - SMOKE and MIRRORS. This is Heathfield's "contribution" to
clc.
Boon said:Evil empire? GCC conforms to the System V ABI as you point out.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.