la************@ugs.com writes:
Chris Croughton <ch***@keristor.net> wrote:
Could someone who has access to the C89 specification please confirm
whether the type long double existed in that spec.?
It did.
One possible source of confusion is that some versions of gcc
incorrectly warn about the "L" length modifier in printf calls:
% cat tmp.c
#include <stdio.h>
int main(void)
{
long double foo = 1.0L;
printf("foo = %Lf\n", foo);
return 0;
}
% gcc --version
2.95.2
% gcc -ansi -pedantic -Wall tmp.c
tmp.c: In function `main':
tmp.c:6: warning: ANSI C does not support the `L' length modifier
In fact, the C90 standard does explicitly support this modifier. This
has been corrected in more recent versions of gcc.
(Strictly speaking, this wasn't a violation of the standard. The
standard allows an implementation to issue any diagnostics it likes,
and doesn't require them to be truthful, and of course there's no
requirement to issue diagnostics for bad format strings. But it was
certainly a bug.)
--
Keith Thompson (The_Other_Keith)
ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.