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 326931 - Better docs for G_GNUC_*
Better docs for G_GNUC_*
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: docs
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2006-01-14 07:06 UTC by Behdad Esfahbod
Modified: 2012-08-16 23:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
improve G_GNUC_* documentaton (7.70 KB, patch)
2012-02-17 14:45 UTC, David King
none Details | Review
docs: Improve G_GNUC_* documentation (7.70 KB, patch)
2012-08-16 23:20 UTC, Matthias Clasen
committed Details | Review

Description Behdad Esfahbod 2006-01-14 07:06:14 UTC
The docs for G_GNUC_* (and possibly other decorative macros) need to specify where in the declaration they should be used.  The function decorators for example should be used after the declaration (just before the semi-colon), otherwise gcc-2.95 would err...

The G_GNUC_UNUSED attribute can be used to mark function parameters and variables as unused too.  In that case, and if that's supported with older gcc versions too, it should be documented as such, and also specified where in the parameter/variable declaration it should appear.
Comment 1 David King 2012-02-17 14:45:31 UTC
Created attachment 207854 [details] [review]
improve G_GNUC_* documentaton
Comment 2 Matthias Clasen 2012-08-16 23:20:16 UTC
The following fix has been pushed:
55ca95c docs: Improve G_GNUC_* documentation
Comment 3 Matthias Clasen 2012-08-16 23:20:19 UTC
Created attachment 221525 [details] [review]
docs: Improve G_GNUC_* documentation

Mention where the GCC attributes should be placed for functions and
arguments. Add an example for G_GNUC_UNUSED.