GNOME Bugzilla – Bug 552098
add G_GNUC_RESTRICT macro
Last modified: 2013-02-03 06:04:50 UTC
C99 introduces the keyword restrict that allows developers to tell the compiler that pointers which share the same type do not alias each other. GCC allows to use this keyword even in C89 mode as __restrict__. It would be nice if GLib could wrap this into G_GNUC_RESTRICT so that it can be used without introducing a dependency on GCC.
Created attachment 118650 [details] [review] patch that adds G_GNUC_RESTRICT to glibconfig.h, including API docs
Out of interest, what do you want to use restrict for ?
Someone expressed his interest to use restrict in GEGL as a means to allow the compiler to create faster code. It appeared to me that it might be of interest for other users of GLib.