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 16:12:36 +0100
- Subject: Re: restrict vs. __restrict__ (gcc 4.8)
- Authentication-results: sourceware.org; auth=none
- References: <okigmg$vif$1@blaine.gmane.org> <CAH6eHdTVSskMi=_BA3mnQ0zvZNjfd1ZqZhKJLR3_JT=9pB-vjA@mail.gmail.com> <11bb672a-42ff-10b6-9feb-0267ec8aaab7@gmail.com>
On 17 July 2017 at 16:09, Ian Pilcher wrote:
> On 07/17/2017 09:23 AM, Jonathan Wakely wrote:
>>
>> Can't you use -std=gnu99 then?
>
>
> Works like a charm. Thanks!
The default for gcc 4.8 is -std=gnu89 which is why you can use GNU
extensions like typeof.
If you want C99 with GNU extensions then use -std=gnu99, because
-std=c99 changes two things: it makes the base standard C99 but it
also disables GNU extensions.
(Alternatively use __typeof__ for the extension).