This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Where is C++'s math.h's double abs(double)?


Gabriel Dos Reis wrote:
> 
> Steven King <sxking@uswest.net> writes:
> 
> | 17.4.4.1/3
> | "Header inclusion is limited as follows:   The C headers ( .h form, described
> | in Annex D, D.5) shall include only their corresponding C++ header, as
> | described above (17.4.1.2)."
> 
> 17.4.4.1/3 is about which headers a <xxx.h> is allowed to #include as
> indicated in the introductory phrase.
> 
> The <xxx.h> may include the corresponding <cxxx> but it may not import
> all names declared name in namespace std; it imports only the
> correspoding "C" name put in namespace std.  That is also how I read
> 
> 17.4.1.2/4
> 
>   Except as noted in clauses 18 through 27, the contents of each
>   header cname shall be the same as that of the corresponding name.h,
>   as specified in ISO/IEC 9899:1990 Programming Languages C (clause 7)
>   or ISO/IEC 9899:1990 Programming Languages --- C AMENDEMENT 1: C
>   integrity, (Clause 7), as appropriate, as if by inclusion.  [...]

Again, that says that the <cname> contains more than the C version of
<name.h>, _not_ the C++ version. "The corresponding name.h as specified
in ISO/IEC 9899", _not_ "...as specified in this standard".

I maintain that the wording in the appendix clearly states that the
<name.h> headers contain the entire contents of the <cname> headers, not
just the contents of the corresponding C headers.

-- 
Ross Smith <ross.s@ihug.co.nz> The Internet Group, Auckland, New Zealand
========================================================================
        "Hungarian notation is the tactical nuclear weapon of
         source code obfuscation techniques." -- Roedy Green


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]