After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 552098 - add G_GNUC_RESTRICT macro
add G_GNUC_RESTRICT macro
Status: RESOLVED WONTFIX
Product: glib
Classification: Platform
Component: general
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2008-09-13 11:26 UTC by Sven Neumann
Modified: 2013-02-03 06:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch that adds G_GNUC_RESTRICT to glibconfig.h, including API docs (1.54 KB, patch)
2008-09-13 11:28 UTC, Sven Neumann
none Details | Review

Description Sven Neumann 2008-09-13 11:26:25 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.
Comment 1 Sven Neumann 2008-09-13 11:28:15 UTC
Created attachment 118650 [details] [review]
patch that adds G_GNUC_RESTRICT to glibconfig.h, including API docs
Comment 2 Matthias Clasen 2008-09-13 19:12:22 UTC
Out of interest, what do you want to use restrict for ?
Comment 3 Sven Neumann 2008-09-16 06:23:27 UTC
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.