[Bug c/32324] unsigned long long operator and integer literals
--- Comment #3 from schwab at suse dot de 2007-06-14 09:45 --- This is still undefined. Use 1U31 instead. -- schwab at suse dot de changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution||INVALID http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32324
[Bug c/32324] unsigned long long operator and integer literals
--- Comment #1 from gcc at axel-naumann dot de 2007-06-13 16:50 --- Created an attachment (id=13699) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13699action=view) Test case as stated in the report. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32324
[Bug c/32324] unsigned long long operator and integer literals
--- Comment #2 from andrew dot stubbs at st dot com 2007-06-13 18:00 --- As it happens, I encountered your real problem quite recently. :) (int)(131) is undefined (C99 standard 6.5.7/4). This modified version gives the same result both ways: int main (){ unsigned long long a = 18446744065119617024llu; /* results expected to be identical */ #ifdef EXPECTED unsigned int b = ((unsigned int)(131)); a = a / b; #else a = a / ((unsigned int)(131)); #endif return a; } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32324