This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/12425] New: Incorrect function argument promotion
- From: "rtag at cadence dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Sep 2003 19:51:48 -0000
- Subject: [Bug c/12425] New: Incorrect function argument promotion
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12425
Summary: Incorrect function argument promotion
Product: gcc
Version: 3.3
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rtag at cadence dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: ia64-unknown-linux-gnu
GCC host triplet: ia64-unknown-linux-gnu
GCC target triplet: ia64-unknown-linux-gnu
In the absence of a prototype, passing 8 arguments of type long and
1 argument of type int in this order to a function which declares all
9 arguments to be of type long results in the value of the passed
int type argument being incorrect in the called function.
I'm not sure what the standards say about promoting an int to a long
when operating in a 64bit environment; but GCC 3.3 for sparc-sun-solaris2.8
(as well as other compilers) seem to correctly handle this case.