This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


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

Long double vs. ANSI inconsistency


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

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