Fw: GCC - 64bit long long type, support in lib

mwoehlke mwoehlke@tibco.com
Wed Aug 9 15:59:00 GMT 2006


Note: not all of us like Asian food (http://cygwin.com/acronyms/#TOFU).
Also, http://cygwin.com/acronyms/#PCYMTNQREAIYR.

fred wrote:
> The gcc supports 64bit int it seems, but the library as downloaded does not,
> for example try
> 
>  long long ldec = 0x11000000000LL;
>  printf("%s: 0x%Lx,%Ld; %s\n","test",ldec,ldec,"test2");
> 
> [snip]
> 
> I think its a problem with configure, I see in configure where test code is
> generated for  #define HAVE_LONG_LONG 1
> but what configure file is supposed to get then set with this
> flag....?config.h ? hmm not happening.

~$ cat bar.c
int main() {
long long foo = 0x1100000000000022LL;
printf("foo = %lld (0x%016llx)\n",foo,foo);
}
~$ gcc -o bar bar.c
~$ ./bar
foo = 1224979098644774946 (0x1100000000000022)
~$ cat > bar.out

WFM, when I use the *correct* modifier. 'L' applies to floating-point; 
you want 'll'. Alas, this doesn't seem to be listed in 'man 3 printf'; 
looks like that should be fixed.

(Yes, I know, http://cygwin.com/acronyms/#SHTDI... maybe I will, later. 
Alternatively, can we use the Linux manpage?)

-- 
Matthew
This is not the list you're looking for. -- Perversion of Obi Wan


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



More information about the Cygwin mailing list