A question about varargs

2008-07-16 Thread Mohamed Shafi
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,

Re: A question about varargs

2008-07-16 Thread Ian Lance Taylor
Mohamed Shafi [EMAIL PROTECTED] writes: 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 That is not a 32-bit value. #define AFTER 0x55 //void test (int n, long long q, int

Re: A question about varargs

2008-07-16 Thread Mohamed Shafi
2008/7/16 Ian Lance Taylor [EMAIL PROTECTED]: Mohamed Shafi [EMAIL PROTECTED] writes: 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 That is not a 32-bit value. #define

Re: A question about varargs

2008-07-16 Thread Ian Lance Taylor
Mohamed Shafi [EMAIL PROTECTED] writes: The value is too big for a long long. When you specify the type, gcc is forced to convert (I hope you can get a warning for that). When you don't specify the type, gcc does not convert. The resulting value has a type which can only be expressed using