Subject: Re: include/setjmp.h including machine/setjmp_jblen.h ...
To: Andrew Cagney <>
From: Chris G Demetriou <Chris_G_Demetriou@LAGAVULIN.PDL.CS.CMU.EDU>
List: tech-ports
Date: 12/04/1994 20:11:54
> > also, i believe that jmp_buf (and sigjmp_buf) should be arrays of
> > 'long's rather than arrays of ints.
> I'd actually like it to be `byte'.  It makes the math so much easier. 
> As you pointed out, however, this doens't force the correct alignment.

i actually don't buy that it makes the math a whit easier.  if i'm
writing the code (as i just did, for instance), i've gotta know how
many register-sized objects i'm putting out there.  which means that
i've gotta do an extra multiplication to get bytes.

> What about poking fun at the compiler and instead declaring it as a union like:
> 	union {
> 		long dummy_to_make_it_long_aligned;
> 		char buf[JBLEN];
> 	} ...
> And thus fooling it into the correct alignment?

I don't understand why doing it in terms of bytes is better...
and that makes access from C a lot harder: i.e. you'd have to
coerce it into an array of right-sized objects.  seems
sort of silly...