This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: restrict vs. __restrict__ (gcc 4.8)
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: Ian Pilcher <arequipeno at gmail dot com>
- Cc: gcc-help <gcc-help at gcc dot gnu dot org>
- Date: Mon, 17 Jul 2017 15:23:29 +0100
- Subject: Re: restrict vs. __restrict__ (gcc 4.8)
- Authentication-results: sourceware.org; auth=none
- References: <okigmg$vif$1@blaine.gmane.org>
On 17 July 2017 at 15:13, Ian Pilcher wrote:
> I just discovered that gcc 4.8 (on CentOS 7) does not support the C99
> restrict keyword, at least not without -std=c99.
Because you're not compiling C99 otherwise.
> __restrict__ seems to work (in the sense that it compiles without
> errors), but I haven't been able to find anything that describes exactly
> what the difference between __restrict__ and restrict is (if any).
The latter is only available from C99, I'm pretty sure that's all.
> Am I safe simply replacing restrict with __restrict__? (I can't easily
> use -sdt=c99, because it seems to disable the typeof operator.)
Can't you use -std=gnu99 then?