This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: c/4943: pointer address corruption in function call
- From: bangerth at dealii dot org
- To: cbenna at iol dot it, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org
- Date: 4 Nov 2002 18:56:50 -0000
- Subject: Re: c/4943: pointer address corruption in function call
- Reply-to: bangerth at dealii dot org, cbenna at iol dot it, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, gcc-gnats at gcc dot gnu dot org
Synopsis: pointer address corruption in function call
State-Changed-From-To: open->closed
State-Changed-By: bangerth
State-Changed-When: Mon Nov 4 10:56:49 2002
State-Changed-Why:
Not a bug. The problem lies here:
ushort i = 0, tmp = 0;
scanf("%u", &tmp);
%u wants an unsigned int, not an unsigned short. With that
change, the program does what is expected. Maybe this
serves as a good reason for considering C++ over C?
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=4943