This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
A question about varargs
- From: "Mohamed Shafi" <shafitvm at gmail dot com>
- To: GCC <gcc at gcc dot gnu dot org>
- Date: Wed, 16 Jul 2008 16:01:39 +0530
- Subject: A question about varargs
Hello all,
I am involved in the porting of gcc 4.1.2 for 16 bit target. For this
target size of long long is 32bits. For the following code
#define VALUE 0x1B4E81B4E81B4DLL
#define AFTER 0x55
//void test (int n, long long q, int y);
void test (int n, ...);
int
main ()
{
test (1, VALUE, AFTER);
exit(0);
}
i find that the machine mode of the arguments of test are HImode,
DImode and HImode. When replace function 'test' with normal one
instead of varargs i find that the machine modes are HImode, SImode
and HImode respectively.
My question is even if the function is a vararg function shouldn't the
mode of the argument be SImode instead of DImode since long long is
only 32bit for the target?
Regards,
Shafi