pkturner@cup.portal.com (Prescott K Turner) (11/14/89)
Where in the draft C standard does it resolve the meaning of typedef float X; int f (const X); which means that f's parameter is a const float? The standard syntax is consistent with another interpretation, that f's parameter is a const int named X. I'm working on a parser, and need to know the general answer, not just this one case. For the life of me, I can't find it in the sections on function declarators, typedef names, scope, or type specifiers. -- Prescott K. Turner, Jr. 13 Burning Tree Rd., Natick, MA 01760 USA (508) 653-0357 UUCP: ...sun!cup.portal.com!pkturner Internet: pkturner@cup.portal.com
gwyn@smoke.BRL.MIL (Doug Gwyn) (11/16/89)
In article <24050@cup.portal.com> pkturner@cup.portal.com (Prescott K Turner) writes:
-Where in the draft C standard does it resolve the meaning of
- typedef float X;
- int f (const X);
-which means that f's parameter is a const float?
Check out 3.5.6, Examples, which explains how to apply the notion of
typedefs in such a declaration context.
rhg@cpsolv.UUCP (Richard H. Gumpertz) (11/17/89)
In article <11603@smoke.BRL.MIL> gwyn@brl.arpa (Doug Gwyn) writes: >Check out 3.5.6, Examples, which explains how to apply the notion of >typedefs in such a declaration context. This text that Doug cites was added sometime between January 1988 and December 1988. If you missed it, it is probably because you have an old draft. I only got around to getting an up-to-date copy last week (sigh). The high cost of the drafts has really hurt -- many people tend to work from obsolete documents. I think DARPA did quite well by making the Internet standards (RFCs) available for "free" (i.e. subsidized indirectly as art of operating the Internet and the NIC) so that nobody would have any excuse for working from obsolete documents. Too bad ANSI can't find a better source of funds and so has to keep such tight control over its documents. -- =============================================================================== | Richard H. Gumpertz rhg%cpsolv@uunet.uu.NET -or- ...uunet!amgraf!cpsolv!rhg | | Computer Problem Solving, 8905 Mohawk Lane, Leawood, Kansas 66206-1749 | ===============================================================================
davidsen@crdos1.crd.ge.COM (Wm E Davidsen Jr) (11/18/89)
In article <449@cpsolv.UUCP> rhg@cpsolv.uucp (Richard H. Gumpertz) writes: | This text that Doug cites was added sometime between January 1988 and | December 1988. If you missed it, it is probably because you have an old | draft. I only got around to getting an up-to-date copy last week (sigh). | | The high cost of the drafts has really hurt -- many people tend to work | from obsolete documents. So has the delay getting the new documents. I have not checked with Global to see if they scrap the old version when the new one comes out, but I did see an old version which was obtained from some vendor within then last few months. | | I think DARPA did quite well by making the Internet standards (RFCs) | available for "free" (i.e. subsidized indirectly as art of operating | the Internet and the NIC) so that nobody would have any excuse for | working from obsolete documents. Too bad ANSI can't find a better | source of funds and so has to keep such tight control over its | documents. Well said. And there would probably be enhanced indices available for it, and people other than the committee would be able to grep for non-indexed references or supporting material, etc. They could certainly license the rights to an online copy for a fat fee and no permission to hardcopy. I won't claim that online documentation never gets made into hardcopy, but it's not very common. -- bill davidsen (davidsen@crdos1.crd.GE.COM -or- uunet!crdgw1!crdos1!davidsen) "The world is filled with fools. They blindly follow their so-called 'reason' in the face of the church and common sense. Any fool can see that the world is flat!" - anon