Pavan Balaji, le Wed 21 Oct 2009 13:23:39 -0500, a écrit :
> On 10/21/2009 10:38 AM, Samuel Thibault wrote:
> > Pavan Balaji, le Wed 21 Oct 2009 10:36:33 -0500, a écrit :
> >> On 10/21/2009 10:28 AM, Samuel Thibault wrote:
> >>> Pavan Balaji, le Wed 21 Oct 2009 09:55:36 -0500, a écrit :
> >>>> 1. I see a AC_PROG_CC_C99 in the configure.ac. Do you require the
> >>>> compiler to be C99 capable always?
> >>> No, we ended up using constructs which should pass c90 and the compilers
> >>> we have tested (aix, solaris, icc).
> >> So shouldn't the AC_PROG_CC_C99 be gotten rid of?
> > No because when C99 is available, we enable some optimization features,
> > like __hwloc_restrict.
> It looks like __hwloc_restrict is not actually checking for C99, but
> instead doing something GNU specific:
It's doing both: if gcc is available, use __restrict, if C99 is
available, use restrict.
> #if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95))
> # define __hwloc_restrict __restrict
> # if __STDC_VERSION__ >= 199901L
> # define __hwloc_restrict restrict
> # else
> # define __hwloc_restrict
> # endif
> Wouldn't it be better to add a feature test for restrict, instead of this?
Please read this thread: