[cc65] sizeof("string") gives wrong results

Date view Thread view Subject view

From: Christian Groessler (cpg_at_aladdin.de)
Date: 2002-05-16 17:33:43


Hi,

the following program returns 3 as sizeof the string. It should return
4 (count the terminating 0 byte).

regards,
chris



#define STRING "abc"

int main()
{
  printf("sizeof = %d\n", sizeof(STRING));
}

----------------------------------------------------------------------
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-05-16 17:34:03 CEST