This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Q. is sizeof(char) always 1


> From: grahams@rcp.co.uk
> Date: Fri, 25 Sep 1998 20:30:04 GMT
> To: egcs-bugs@cygnus.com

> The reason I'm asking this question is a lot of code in egcs assumes
> that sizeof(char) is 1 when allocating memory.

> Are bugs waiting to bite should a machine exist where
> sizeof(char) != 1

You might find reading the ANSI Standard for C++ enlightening:

`sizeof(char) , sizeof(signed char) and sizeof(unsigned char) are 1'


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]