autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AC_C_RESTRICT and AC_PROG_CC_STDC


From: Noah Misch
Subject: Re: AC_C_RESTRICT and AC_PROG_CC_STDC
Date: Mon, 14 May 2007 11:18:31 -0700
User-agent: Mutt/1.5.9i

On Mon, May 14, 2007 at 09:58:55AM -0700, Paul Eggert wrote:
> Noah Misch <address@hidden> writes:
> 
> >     * lib/autoconf/c.m4 (AC_C_RESTRICT): Check `restrict' last.
> 
> Thanks, that makes sense to me.  I installed the patch enclosed at the
> end of this message.

Thanks, particularly for documenting it nicely.

>    /* Define to `__inline__' or `__inline' if that's what the C compiler
>       calls it, or to nothing if 'inline' is not supported under any name.  */
>    #ifndef __cplusplus
>    /* #undef inline */
>    #endif
> 
> Does this need to be reworked, to be consistent with 'restrict'?
> Or are 'inline' and 'restrict' sufficiently different that we should
> just leave 'inline' alone?  I don't use C++ much so I'm asking you C++ 
> experts.

I am no C++ expert, but I'll speculate for the benefit of those with grains of
salt to spare.  C99 makes both `inline' and `restrict' newly official.  C++ has
supported `inline' nearly forever[1], but `restrict' is not yet a standard C++
feature.  The difference in Autoconf's treatment is appropriate.

[1] http://www.research.att.com/~bs/hopl2.pdf




reply via email to

[Prev in Thread] Current Thread [Next in Thread]