This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: g++ -pedantic warns erroneously for POSIX strftime()
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- To: Jorma Laaksonen <jorma dot laaksonen at hut dot fi>
- Cc: <gcc-bugs at gcc dot gnu dot org>
- Date: Tue, 5 Nov 2002 20:13:34 +0000 (GMT)
- Subject: Re: g++ -pedantic warns erroneously for POSIX strftime()
On Tue, 5 Nov 2002, Jorma Laaksonen wrote:
> says that POSIX C supports %T and as the ISO C++ Standard says that
> C functions are externally defined by POSIX or other bodies, I would
> conclude that the warning is outdated.
The ISO C++ standard says that [intro.refs]#2 "The library described in
clause 7 of ISO/IEC 9899:1990 and clause 7 of ISO/IEC 9899/Amd.1:1995 is
hereinafter called the Standard C Library" and again includes references
to the specific version numbers in [lib.headers]#4 and in
[lib.date.time]#2 references the Standard C library. Applying a different
version of ISO/IEC 9899 from that given in the normative references in
ISO/IEC 14882:1998 would be manifestly broken, even if ISO directives
would state that C99 replaces C90 in this regard. A future edition of the
C++ standard will probably include a reference to C99 instead, in which
case -pedantic will behave appropriately in that C++ standard mode once
implemented.
--
Joseph S. Myers
jsm28@cam.ac.uk