bug-autoconf
[Top][All Lists]
Advanced

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

restrict keyword defined as __restrict


From: Yann Droneaud
Subject: restrict keyword defined as __restrict
Date: Tue, 01 Dec 2009 15:19:00 +0100

Hi,

While testing AC_PROG_CC_C99 and AC_C_RESTRICT, I've found something,
that might be a bug.

With any C99 compliant compiler (gcc -std=c99 or clang), restrict
keyword test always found "__restrict" instead of plain "restrict",
eg. config.h contains: #define restrict __restrict

But according to manual:

"If the C compiler recognizes a variant spelling for the restrict
keyword (__restrict, __restrict__, or _Restrict), then define restrict
to that; this is more likely to do the right thing with compilers that
support language variants where plain restrict is not a keyword.
Otherwise, if the C compiler recognizes the restrict keyword, don't do
anything. Otherwise, define restrict to be empty."

and header config.h:

"Define to the equivalent of the C99 'restrict' keyword, or to nothing
if this is not supported.  Do not define if restrict is supported
directly."

So, If i don't misunderstand, there should be no #define for restrict
keyword in this case.

Regards.

-- 
Yann Droneaud






reply via email to

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