Achim Fritz wrote:
[...]
de.comp.lang.c
de.comp.lang.iso-c++
sind die Gruppen deiner Wahl...

[EMAIL PROTECTED]:~/ugspeicher/test-proc> cat testint.c
#include  <stdlib.h>

int main(void){
   long long int a=2200000000;
   int b=2200000000;
   printf("a=%d\n",a/1000);
   printf("b=%d\n",b);
   exit(0);
}
[EMAIL PROTECTED]:~/ugspeicher/test-proc> gcc testint.c
testint.c: In function `main':
testint.c:4: warning: decimal constant is so large that it is unsigned
testint.c:5: warning: decimal constant is so large that it is unsigned
[EMAIL PROTECTED]:~/ugspeicher/test-proc> ./a.out
a=2200000
b=-2094967296
Funktioniert bei mir


[...]



Der Kernel hat auch keine Probleme mit grossen Zahlen:
[EMAIL PROTECTED]:~/ugspeicher/test-proc> echo "2^31"|bc
2147483648
[EMAIL PROTECTED]:~/ugspeicher/test-proc> echo "2^32"|bc
4294967296
[EMAIL PROTECTED]:~/ugspeicher/test-proc> echo "2^100"|bc
1267650600228229401496703205376
Was hat das mit dem Kernel zu tun?

Stefan


--
Haeufig gestellte Fragen und Antworten (FAQ): http://www.de.debian.org/debian-user-german-FAQ/


Zum AUSTRAGEN schicken Sie eine Mail an [EMAIL PROTECTED]
mit dem Subject "unsubscribe". Probleme? Mail an [EMAIL PROTECTED] (engl)



Antwort per Email an