C
Chris Hills
Keith Thompson said:Most current compilers fail to meet the C99 standard because certain
features are not (yet) implemented. Most current compilers *do* meet
the C90 standard (officially obsolete though it may be); deviations
from C90 are typically bugs, usually minor ones, not features that
have not yet been implemented.
Generally true. However many 8 bit compilers do not always have the full
feature set for C90.
I agree totally. It is the practical C standard in use.C90 conformance is a useful concept in the real world.
If a
compiler's documentation claims that it conforms to C90, I can use my
officially obsolete copy of the C90 standard to find out how the
compiler will behave. If it fails to behave as it claims to, I can
cite the C90 standard in my bug report.
However the documentation for the compiler will usually tell you where
the compiler differs from the standard. If they have stated that in the
manual when you send in your "bug report" they will refer you back to
the page in the manual and close the report.
If it were a certified Ada compiler you would have a point. There is no
such thing as a Certified C compiler in the same way.
There are validation reports for C compilers but these document the
differences between the compiler and the C standard (usually C90) and
how the compilers fair on various test suites including things like
Paranoia. (Which is floating point and nothing to do with the C
standard.
That's what a standard is for, to provide a proposed contract between
implementers and users.
Sort of correct.. A "proposed" language spec. NOT a contract. The
contractual spec is the one in the compiler spec. the spec you need to
read to see the actual compiler limits.
The C90 standard, in the current state of
affairs, happens to be more useful as such a contract than the C99
standard.
I agree.
I doubt it. Besides by the time the majority get close to C99 compliance(I hope to see that change someday; if gcc's C99
conformance is ever completed, that might finally provide the impetus
to make it happen.)
it will be C20** I expect.
Many commercial compilers use C99 complaint front ends. It is just that
the seen no need to rush to make the whole compiler c99 compliant.
But you know all that.
He didn't ask what his C compiler will actually do. He asked how many
levels of pointers C89 requires. I answered the question that he
actually asked.
NO he did NOT. What he asked was :- "How many levels of pointers can you
have?"
No reference was made to ANY c standard or any compiler or environment.
The ONLY answer is:
"12 in the standard but you have to check your compiler to see what they
have actually implemented."
No he stated that it wasHe could have had any number of reasons for asking
it; perhaps it was just historical curiosity.
"This question is occur in interview. Please help me. "
You have no idea if they were discussing C in general, Standard C (which
standard) , a particular compiler or environment.
If the discussion was PIC12 the answer probably will not be 12
Not at all. It is the most widely used standardDo you object to any
discussion of the C90 standard?
If so, you are (uncharacteristically)
attempting to impose a far stricter topicality standard than most of
feel is appropriate.
No. I said you have to check the compiler docs.