From: Paul Eggert Date: Mon, 4 May 2026 20:54:24 +0000 (-0700) Subject: doc: improve AC_C_RESTRICT doc X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b692310133c217edd7cbeeb1ddf592a18dab945f;p=thirdparty%2Fautoconf.git doc: improve AC_C_RESTRICT doc --- diff --git a/doc/autoconf.texi b/doc/autoconf.texi index 34d7d2769..70fcf2438 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -7599,7 +7599,8 @@ If the C compiler supports C11-style generic selection using the @caindex c_restrict If the C compiler recognizes a variant spelling for the @code{restrict} keyword (@code{__restrict}, @code{__restrict__}, or @code{_Restrict}), -then define @code{restrict} to that; this is more likely to do the right +then define @code{restrict} to that for both C++ and pre-C99 C; +this is more likely to do the right thing with compilers that support language variants where plain @code{restrict} is not a keyword. Otherwise, if the C compiler recognizes the @code{restrict} keyword, don't do anything. diff --git a/lib/autoconf/c.m4 b/lib/autoconf/c.m4 index 218c78a7d..f386d0245 100644 --- a/lib/autoconf/c.m4 +++ b/lib/autoconf/c.m4 @@ -2206,7 +2206,7 @@ AC_DEFUN([AC_C_RESTRICT], AH_VERBATIM([restrict], [/* Define to the equivalent of the C99 'restrict' keyword, or to nothing if this is not supported. Do not define if restrict is - supported only directly. */ + supported directly. */ #if ! (defined __STDC_VERSION__ && 199901L <= __STDC_VERSION__) #undef restrict #endif