This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/31679] Incorrect result of multiplication long long by 0xFFFFFFFFLL constant.
- From: "vlasenko at bifit dot com dot ua" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Apr 2007 12:16:31 -0000
- Subject: [Bug target/31679] Incorrect result of multiplication long long by 0xFFFFFFFFLL constant.
- References: <bug-31679-14450@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from vlasenko at bifit dot com dot ua 2007-04-24 13:16 -------
Yes, it compiles with warning... so what? The bug is not in the warning. If you
insert #include <stdio.h> in the top of source the bug reproduces and the
problem will not leave.
ÎÊ, if you want to play in bureaucracy, than here is a source that compiles
without warnings:
int __attribute__((__cdecl__)) printf (const char *, ...);
int main()
{
long long qhat = 1;
long long res = qhat * 0xffffffffLL;
printf("res = %llx\n", res);
}
P.S. I simply didn't want to include the source of cygwin's stdio.h, to keep
things simplier for YOU.
--
vlasenko at bifit dot com dot ua changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|INVALID |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31679