This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: libc implementations supporting C99 formats
- To: Robert Lipe <robertlipe at usa dot net>
- Subject: Re: libc implementations supporting C99 formats
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- Date: Tue, 17 Oct 2000 23:26:15 +0100 (BST)
- cc: gcc at gcc dot gnu dot org
On Tue, 17 Oct 2000, Robert Lipe wrote:
> The new SCO UDK for UnixWare and OpenServer purports to support all
> library but "return value for snprintf(3S) when the destination array is
> not long enough" and all language features other than complex arithmetic
> and VLA's.
>
>
> Though I'm not personally involved in those tools, I can try tests if you
> need a sanity check on something as I have them installed locally.
An obvious sanity check that the printf/scanf may be working C99
implementations would be to printf an infinity with all eight floating
point formats (%a %e %f %g %A %E %F %G) and check that it comes out as
"inf" or "infinity" with the lowercase ones and "INF" or "INFINITY" with
the uppercase ones (this being the only difference between %f and the new
%F; the choice of inf versus infinity should be documented in your
conformance document). Then check that scanf will accept the same eight
formats and scan infinities back in (printf %f etc. taking a double
argument; scanf %f etc. taking a float * argument).
Essentially, when producing an announcement of format checking work for
the News section (which Gerald Pfeifer asked for some time ago), it seems
appropriate to include a note that you need library support to use the new
formats as well as a compiler which understands them with -Wall, and to
indicate something about the availability of such support; subject to any
limitations on not appearing to promote non-free software it seems it
would be useful to give some indication of where, apart from glibc 2.2 for
GNU/Linux and HURD, such formats can be used.
--
Joseph S. Myers
jsm28@cam.ac.uk