Re: Getting host and target size and alignment information at build time?

2008-04-16 Thread Tim Josling
On Sat, 2008-04-12 at 18:16 +1000, Tim Josling wrote: > On Fri, 2008-04-11 at 17:05 -0400, Daniel Jacobowitz wrote: > > On Sat, Apr 12, 2008 at 06:59:28AM +1000, Tim Josling wrote: > > > > Why not get it out of GCC later? You don't need to hack up GCC to do > > > > that. > You're right... That's

Re: Getting host and target size and alignment information at build time?

2008-04-12 Thread Tim Josling
On Fri, 2008-04-11 at 17:05 -0400, Daniel Jacobowitz wrote: > On Sat, Apr 12, 2008 at 06:59:28AM +1000, Tim Josling wrote: > > > Why not get it out of GCC later? You don't need to hack up GCC to do > > > that. > That's not what I meant. You don't need it _during the GCC build > process_. You ca

Re: Getting host and target size and alignment information at build time?

2008-04-11 Thread Daniel Jacobowitz
On Sat, Apr 12, 2008 at 06:59:28AM +1000, Tim Josling wrote: > > Why not get it out of GCC later? You don't need to hack up GCC to do > > that. > > Later is too late. I need to make decisions before the GCC back end gets > involved (the back end is in a separate OS process). For example "Is > thi

Re: Getting host and target size and alignment information at build time?

2008-04-11 Thread Tim Josling
On Fri, 2008-04-11 at 09:07 -0400, Daniel Jacobowitz wrote: > Please don't reply to an existing thread to post a new question. Sorry, I didn't realize that would cause a problem. > Simply put, you can't do this. All of these things can depend on > command line options. It does seem you can only

Re: Getting host and target size and alignment information at build time?

2008-04-11 Thread Daniel Jacobowitz
Please don't reply to an existing thread to post a new question. On Fri, Apr 11, 2008 at 08:52:11PM +1000, Tim Josling wrote: > I have found tm.h, and also bconfig.h, config.h and tconfig.h. The sizes > are more or less OK as there are macros for sizes, apart from pointer > sizes in some cases. Th

Getting host and target size and alignment information at build time?

2008-04-11 Thread Tim Josling
I need to find out the alignment and size information for the standard integral types and pointer types at GCC build time. The information is needed to work out the sizes of data structures so that warnings about size mismatches can be produced. The information is needed at build time because th