C90 doesn't allow %lf use in printf, why?
c
Solution
According to C90 documentation:
an optional l (ell) specifying that a following d , i , o , u , x , or X conversion specifier applies to a long int or unsigned long int argument; an optional l specifying that a following n conversion specifier applies to a pointer to a long int argument; or an optional L specifying that a following e , E , f , g , or G conversion specifier applies to a long double argument. If an h , l , or L appears with any other conversion specifier, the behavior is undefined.
Problem
I'm a beginner programming student, just wanted to learn the reason behind this. When I use this code: ``` #include <stdio.h> int main() { double pi = 3.1415926535897932; printf("%lf",pi); return 0; } ``` Compiler gives this warning. ISO C90 does not support the ‘%lf’ gnu_printf format [-Wformat] I use the gcc compiler in ubuntu terminal with (-o -Wall -ansi -pedantic-errors) What's the reason behind this? I searched web and found this use is allowed in C99. Why C90 didn't allow %lf use in printf? I can use %.16lf or %.16f and both print with the same precision, so what's the matter that makes %lf bad in C90?