[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: C99 inline and restrict keyword tests
From: |
Ralf Wildenhues |
Subject: |
Re: C99 inline and restrict keyword tests |
Date: |
Tue, 1 Dec 2009 19:25:40 +0100 |
User-agent: |
Mutt/1.5.20 (2009-08-09) |
Hello Yann,
* Yann Droneaud wrote on Tue, Dec 01, 2009 at 03:09:11PM CET:
> If AC_PROG_CC_C99 successfully found a C99 compliant C compiler,
> AC_C_INLINE and AC_C_RESTRICT should use this result.
>
> Testing for "inline" and "restrict" keywords is redundant,
> eg, checking ac_cv_prog_cc_c99 = yes should be enough.
Well, in theory you are right. In practice, the restrict macro tries to
get a spelling that is likely to be accepted by the C++ compiler as
well, and the inline case checks for a specific compiler bug:
# HP C version B.11.11.04 doesn't allow a typedef as the return value for an
# inline function, only builtin types.
I can only check B.11.11.20, and it does not seem to have that bug (any
more).
Cheers,
Ralf