This is the mail archive of the gcc-patches@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: autoconf for type sizes


On Mon, Mar 12, 2001 at 04:14:38PM -0800, Richard Henderson wrote:
> On Mon, Mar 12, 2001 at 12:03:19PM -0800, Zack Weinberg wrote:
> > +   AC_TRY_COMPILE(,
> > +   [char test[(char)((char)1 << $i)
> > +               ? (char)((char)1 << $i) == 1 ? 1 : -1
> > +               : 1];],
> 
> The "(char)1" cast isn't needed.  The example I gave you would work
> for long too, which does need it.

I need to read your examples more carefully in future.  It was late.

> Also, don't you need special handling for embedding [] here?

There are enough quotes around that expression that the [] survive.
You can't put changequote deep in the middle of a many-times-quoted
expression, m4 gets really confused.

The switch hack would be less fragile; I'll change it.

zw


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