On Nov 15, 2017 15:20, "Ondřej Hlavatý" <[email protected]> wrote:
Hi, strictly speaking, couldn't you define "restrict" a macro in the same way then? ;) You couldn't. "restrict" is a legal identifier in C89, and existing code can use it e.g. as a regular variable/function name. Identifiers starting with two underscores are reserved, so the same problem doesn't apply for __restrict__. On 15.11., Jiří Zárevúcky wrote: > Hi, > > the reason is that "restrict" wasn't a keyword before C99, so those headers > couldn't be included in code written for C89. __restrict__ is non-standard, > but that doesn't limit its usability in any way -- if you want to use a > compiler that doesn't support it, you can just define __restrict__ to be an > empty macro on the command line. > > On Nov 15, 2017 10:00 AM, "Vojtech Horky" <[email protected]> wrote: > > > Hello Jiri, > > > > I have noticed the following commit [1] where the restrict keyword was > > replaced with __restrict__ in multiple headers. I was wondering what > > is the reason for replacing C99 standard keyword with a proprietary > > extension (though implemented both by GCC and clang)? I assume they > > are equivalent, right? > > > > Thanks, > > - Vojtech > > > > > > [1] https://github.com/HelenOS/helenos/commit/ > > 0dd477996e38407057517d8fe2b97d416cd4e667 > > > > _______________________________________________ > > HelenOS-devel mailing list > > [email protected] > > http://lists.modry.cz/listinfo/helenos-devel > > > _______________________________________________ > HelenOS-devel mailing list > [email protected] > http://lists.modry.cz/listinfo/helenos-devel _______________________________________________ HelenOS-devel mailing list [email protected] http://lists.modry.cz/listinfo/helenos-devel
_______________________________________________ HelenOS-devel mailing list [email protected] http://lists.modry.cz/listinfo/helenos-devel
