Date: Wed, 5 Nov 1997 19:45:58 -0800 (PST) Message-Id: <199711060345.TAA03139@adit.ap.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" To: sam DOT ravnborg AT image DOT dk (Sam Ravnborg), djgpp AT delorie DOT com From: Nate Eldredge Subject: Re: GCC: Is it possible to set int=16bit Precedence: bulk At 06:45 11/5/1997 GMT, Sam Ravnborg wrote: >I have downloded DJGPP and like the look and feel of RHIDE (yes, I >used Borland in the past). >I am looking for an easy way to test my programs which int the end >will run on an embedded target. >I would like to use RHIDE/GCC to compile my programs if possible. > >In first place GCC fails because sizeof(int) == 4bytes == 32 bits. > >The requirements I have is: >sizeof(int) == 2 bytes >little endian >alignment within records: ints are aligned to an even address. >enums with less than 128 members s one byte in size. >one byte equals 8 bits. Assuming this is still a 386 or equivalent, I think you can get that by using `short' instead of `int' and using the flag `-fshort-enums'. > >My question is: >Are there any easy way to setup GCC to these requirements - I know I >have to figure out how to compile GCC etc. but want to hear any >suggestion to the above first. If this is a totally new machine, you'll have to port GCC. I'd suggest reading the second half of the GCC manual, which talks about modifying and porting the compiler, and also look at the sources. HTH Nate Eldredge eldredge AT ap DOT net