home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!microsoft!hexnut!jimad
- From: jimad@microsoft.com (Jim Adcock)
- Subject: Re: Standard library functions and macros
- Message-ID: <1993Jan12.191639.8524@microsoft.com>
- Date: 12 Jan 93 19:16:39 GMT
- Organization: Microsoft Corporation
- References: <1993Jan5.032555.12777@lucid.com> <1993Jan06.183334.4535@microsoft.com> <1993Jan7.042121.23809@lucid.com>
- Lines: 34
-
- In article <1993Jan7.042121.23809@lucid.com> jss@lucid.com (Jerry Schwarz) writes:
- |jimad:
- ||> And such control
- ||> over inline expansion is precisely the control permitted deliberately
- ||> and explicitly in the base doc -- the ANSI-C base doc.
- |
- |You keep saying this, but you don't explain how you arrive at that
- |conclusion. What the C standard allows is being sure that a
- |macro isn't in scope. It does not let you control whether the standard
- |functions are inlined.
-
- You are looking at it from the strictly conforming programmers point of
- view. I am discussing it from the implementors and the conforming
- programmers point of view. You right that ANSI-C doesn't require either
- a non-inline or an inline implementation. ANSI-C does require that if
- an inline [macro] implementation is given that a non-inline implementation
- also be present. It is true that an optimizing compiler or linker could
- take the non-inline and make it inline again. This is the as-if rule.
- So there is no strictly-conforming way the programmer can be guaranteed
- this control.
-
- However, from the view of the implementer and the conforming programmer,
- implementations can and do follow the ANSI-C guidelines for how the
- standard libraries are "suppose" to work. And *conforming* programs
- and programmers do make use of the features of those conforming implementations.
- You are now suggesting removing the [reasonable] possibility of
- implementations continuing to support the ANSI-C libraries in the
- manner the ANSI-C document calls out. You have destroyed a clear intent
- of the ANSI-C document, and you have done so without allowing for the
- obsolecense period called for in the ANSI-C document. This is a clear
- violation of the ANSI-C base document. Again, if you insist on violating
- the rules laid down by the ANSI-C base document, then the ANSI-C++
- committee should not claim the ANSI-C document is one of their
- base documents.
-