The AC_C_RESTRICT macro should prioritize the standard restrict keyword first instead of __restrict or any other.
The problem with going with alternate versions of restrict instead of the standard keyword first is that the alternatives have possibly different behaviours from the standard. As well, this complicates static analysis of the source which shouldn't have to work around a bunch of non-standard spellings (static analysis tools should also analyse as close as possible a configuration of the host compiler instead of analysing a separate configuration for them). Moreover, redefining restrict is technically undefined behaviour if the compiler provides it. To work around the issue that __restrict would be more portable to C++ compilers an AC_CXX_RESTRICT macro should be made instead of having AC_C_RESTRICT serve two purposes. Alternatively, the language pushing and popping mechanism should be used. Thank you, Steven Stewart-Gallus