summaryrefslogtreecommitdiff
path: root/glib/gmacros.h
diff options
context:
space:
mode:
authorPhilip Withnall <pwithnall@endlessos.org>2020-11-25 11:37:06 +0000
committerPhilip Withnall <pwithnall@endlessos.org>2020-11-25 11:37:06 +0000
commit9cccc08b82d1df43c96e1fc1eb97ee6b1e2e30c5 (patch)
tree07d2933c57c389546aaabba9871ac09969089ac4 /glib/gmacros.h
parent76426c0158323ab96b0991a4ed69358ed1c8e7e2 (diff)
downloadglib-9cccc08b82d1df43c96e1fc1eb97ee6b1e2e30c5.tar.gz
gmacros: Document soft-deprecation of G_GNUC_NORETURN
It still works, and deprecating it would be quite disruptive (as it’s used in headers), so amend the documentation to point people to `G_NORETURN` instead. Signed-off-by: Philip Withnall <pwithnall@endlessos.org> Helps: #994
Diffstat (limited to 'glib/gmacros.h')
-rw-r--r--glib/gmacros.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/glib/gmacros.h b/glib/gmacros.h
index e5cd32eca..65f3738a6 100644
--- a/glib/gmacros.h
+++ b/glib/gmacros.h
@@ -423,6 +423,12 @@
* It is used for declaring functions which never return. It enables
* optimization of the function, and avoids possible compiler warnings.
*
+ * Since 2.68, it is recommended that code uses %G_NORETURN instead of
+ * %G_GNUC_NORETURN, as that works on more platforms and compilers (in
+ * particular, MSVC and C++11) than %G_GNUC_NORETURN, which works with GCC and
+ * Clang only. %G_GNUC_NORETURN continues to work, so has not been deprecated
+ * yet.
+ *
* Place the attribute after the declaration, just before the semicolon.
*
* |[<!-- language="C" -->