Nellis, Kenneth wrote:
>So, then, after changing %d to %lld, gcc -Wall -pedantic complains:
>
>x.c: In function ‘main’:
>x.c:12:2: warning: ISO C90 does not support the ‘ll’ gnu_printf length 
>modifier [-Wformat=]
>  printf("pos = %lld\n",lseek(f, 0l, SEEK_CUR));
>  ^
>x.c:12:2: warning: ISO C90 does not support the ‘ll’ gnu_printf length 
>modifier [-Wformat=]

Or you could use the standard: include <stdint.h> and:

  printf("pos = %jd\n", (intmax_t)lseek(f, 0l, SEEK_CUR));

>
>Wondering how to printf an off_t value without the compiler complaining while
>using -Wall -pedantic.
>
>--Ken Nellis

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply via email to