GNOME Bugzilla – Bug 326931
Better docs for G_GNUC_*
Last modified: 2012-08-16 23:20:19 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.
Created attachment 207854 [details] [review] improve G_GNUC_* documentaton
The following fix has been pushed: 55ca95c docs: Improve G_GNUC_* documentation
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.