When adjusting the "tuning knobs" of the Linux 2.6.10 scheduler (kernel/sched.c), if the default timeslice is set higher than ~210 milliseconds, gcc dies with an "integer overflow in expression". The problem can be isolated into an elementary program: # gcc -Wall jo.c jo.c: In function `main': jo.c:5: warning: integer overflow in expression # cat jo.c #include <stdio.h> int main() { unsigned long long i = (3000 * 1000000000); printf("i=%Lu\n", i); return 0; } I'm not actively tracking gcc 4 development, so perhaps gcc 3.4.3's troubles with integer math involving values > 2G are old news? I'm in a hurry and worked around the problem by providing hard coded constants in octal, but I'd prefer gcc to just do the "right" thing. I didn't see any gcc options to enable support for integer arithmetic > 2GB. Maybe this is just a missing feature instead of a bug? Thoughts?
does it work with gcc-3.4.3-r1 ?
> does it work with gcc-3.4.3-r1 ? Sorry .. I don't have an install of that version anymore. The test program I supplied is 8 lines long, so maybe someone else with gcc-3.4.3-r1 could test? Perhaps this will help? #/usr/lib/gcc-lib/i586-pc-linux-gnu/3.3.5/cc1 -Wall j.c main jo.c: In function `main': jo.c:5: warning: integer overflow in expression
gavin: That looks like you're not using gcc-3.4.3.20050110. What's the output of 'gcc-config -l'? Try switching to 3.4.3.20050110.
Sorry, it seems my last post was too brief. I filed a bug based on the behavior of gcc 3.4.3.20050110 (latest ebuild marked stable). You asked me to test gcc-3.4.3-r1, but I don't have easy access to that version, so I provided a second test using a different version of gcc (3.3.5) that I do have easy access to (same system). The first test was performed using the plain "i586-pc-linux-gnu-3.4.3" gcc specs (according to "gcc-config -l").
Try 3.4.4. If it doesn't work there, I'd file a bug upstream. This isn't the kind of thing I really care to tackle ;)