Mail Archives: djgpp/2001/06/29/12:50:16
> Date: Fri, 29 Jun 2001 17:15:07 +0200
> From: Waldemar Schultz <schultz AT mathematik DOT tu-muenchen DOT de>
>
> verification example ldbl.c:
> #include <stdio.h>
> int main(void)
> {
> long double zz;
>
> scanf("%Le",&zz);
> scanf("%LE",&zz);
> scanf("%lle",&zz); // 8
> scanf("%llE",&zz); // 9
> scanf("%Lf",&zz);
> scanf("%LF",&zz); //11
> scanf("%llf",&zz); //12
> scanf("%llF",&zz); //13
> scanf("%Lg",&zz);
> scanf("%LG",&zz);
> scanf("%llg",&zz); //16
> scanf("%llG",&zz); //17
>
> return 0;
> }
>
> gcc -W -Wall ldbl.c
> ldbl.c: In function `main':
> ldbl.c:8: warning: use of `q' length character with `e' type character
> ldbl.c:9: warning: use of `q' length character with `E' type character
> ldbl.c:11: warning: unknown conversion type character `F' in format
> ldbl.c:11: warning: too many arguments for format
> ldbl.c:12: warning: use of `q' length character with `f' type character
> ldbl.c:13: warning: unknown conversion type character `F' in format
> ldbl.c:13: warning: too many arguments for format
> ldbl.c:16: warning: use of `q' length character with `g' type character
> ldbl.c:17: warning: use of `q' length character with `G' type character
>
> >From the doc I would not have expected these warnings.
> Maybe I again have overlooked something .
The documentation describes the library implementation. The library
accepts all of the combinations you tried and produces expected
results. The compiler whines (under -W -Wall) because some of these
combination are non-standard, and so the compiler doesn't know about
them. (Most compilers don't check the format strings, but GCC does.)
- Raw text -