This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
printf or stdargs bug (one-liner).
- From: Yuri Dotsenko <dotsenko at rice dot edu>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 04 Jun 2003 18:49:17 -0500
- Subject: printf or stdargs bug (one-liner).
Hi,
It was discovered that gcc (3.2.2 or 3.3) both miscompile the following
code:
#include "stdio.h"
int main() {
unsigned long long lu;
int d;
lu = 8;
d = 4;
printf("test1: %lu %d\n", lu, d); // prints: 8 0, instead of 8 4
printf("test1: %d %lu\n", d, lu); // prints: 4 8 - Ok
return 0;
}
Thanks,
Yuri