Re[2]: [cc65] More assignments and typecasting questions

Date view Thread view Subject view

From: groepaz (groepaz_at_gmx.net)
Date: 2002-07-24 18:18:54


Hello Ullrich,

Wednesday, July 24, 2002, 5:59:59 PM, you wrote:


UvB> On Wed, Jul 24, 2002 at 05:25:10PM +0200, groepaz wrote:
>> bla(unsigned char p1,unsigned short p2, [more params]);
>>
>> and if compiled without prototype the generated code would pass "p1"
>> as a 16bit value, resulting in messed up parameters.

UvB> Yes, you are right. chars are passed as chars in presence of a prototype. If
UvB> there is no prototype, a variadic parameter list is assumed which means that
UvB> the default promotions are applied and chars are passed as ints.

yeah thats what i thought.....

-- 
Best regards,
 groepaz                            mailto:groepaz_at_gmx.net


----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2002-07-24 18:19:10 CEST