forcing tail/sibling call optimization
Fergus Henderson
fjh@cs.mu.oz.au
Sun Nov 26 17:56:00 GMT 2000
On 26-Nov-2000, Robert Dewar <dewar@gnat.com> wrote:
> <<In ANSI/ISO C: no. But the ANSI/ISO C standard is not a good model
> for how to write specifications.
> >>
>
> I disagree, it is an EXCELLENT model for how to write *specifications*.
>
> <<In GNU C: yes. For example, many parts of the GNU C manual say
> that if a certain option is enabled, the compiler will issue
> certain warnings. If the GNU C manual is treated as a specification,
> these parts of the manual are definitely requirements on the compiler.
> >>
>
> The GNU C manual is nowhere near a formal specification, it is fine
> for a compiler manual to talk about warnings, but it is not possible
> to "treat" the GNU C manual as a specification, it is just not
> precise enough.
Sorry, I was not clear. When I said that the ANSI/ISO C standard is
not a good model [see Footnote], I meant in comparison to e.g. the Ada
standard. I certainly did not mean to imply that the GNU C manual was
a better model!
> So if you want to state what you are proposing as a formal specification,
> the "requirement" for a warning should be implementation advice. After all
> we expect that GNU C will follow implementation advice for features that
> we design :-)
I happen to think that it would be good for ANSI/ISO language standards
to include requirements for warnings. However, that is a separate battle,
and for this proposal I'm happy to amend the formal spec so that the
warnings are merely implementation advice rather than requirements.
[Footnote]
The ANSI/ISO C standard is not a good model, because
(1) the notions of conformance that it defines are not useful
("conforming programs" is the universal set and
"strictly conforming programs" can't produce any output).
(2) it is very imprecise in many parts
(3) it took the C committee a long time to accept the idea of
incorporating "implementation advice" or "recommended practice"
sections; the C89 standard didn't have any of those,
and even in C99 there are still many parts of the standard
which are phrased as normative but using deliberately poorly defined
terms, in some cases deliberately so because they didn't have
any concept of "implementation advice" sections.
--
Fergus Henderson <fjh@cs.mu.oz.au> | "I have always known that the pursuit
| of excellence is a lethal habit"
WWW: < http://www.cs.mu.oz.au/~fjh > | -- the last words of T. S. Garp.
More information about the Gcc
mailing list