This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Long double vs. ANSI inconsistency
- To: bug-gcc at gnu dot org
- Subject: Long double vs. ANSI inconsistency
- From: Tomasz Kowaltowski <tomasz at ic dot unicamp dot br>
- Date: Tue, 10 Oct 2000 12:47:36 -0200
I'm using the following gcc version distributed with RedHat 6.1:
gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
The test program (testlongdouble.c) was:
-----------------------------------------------
#include <stdio.h>
int main() {
long double ld = 1.0/3.0;
printf("%Lf\n",ld);
return 0;
}
------------------------------------------------
Using
gcc -ansi -Wall -pedantic -o testlongdouble testlongdouble.c
it gives the following warning:
testlongdouble.c: In function `main':
testlongdouble.c:7: warning: ANSI C does not support the `L'
length modifier
Why doesn't it issue a warning about the declaration of a "long double"
variable? Doesn't seem to be consistent!
-- Tomasz Kowaltowski
tomasz@ic.unicamp.br