mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-28 00:16:15 +01:00
gmacros: MSVC supports the noreturn function attribute
But it can't be used as a drop-in implementation of G_GNUC_NORETURN because it can only be placed at the start of the function prototype. Document this in a comment so that the next person doesn't spend 20 min figuring it out.
This commit is contained in:
parent
5751189fb8
commit
2a76dba03e
@ -190,6 +190,10 @@
|
||||
#define G_GNUC_SCANF( format_idx, arg_idx )
|
||||
#define G_GNUC_STRFTIME( format_idx )
|
||||
#define G_GNUC_FORMAT( arg_idx )
|
||||
/* NOTE: MSVC has __declspec(noreturn) but unlike GCC __attribute__,
|
||||
* __declspec can only be placed at the start of the function prototype
|
||||
* and not at the end, so we can't use it without breaking API.
|
||||
*/
|
||||
#define G_GNUC_NORETURN
|
||||
#define G_GNUC_CONST
|
||||
#define G_GNUC_UNUSED
|
||||
|
Loading…
Reference in New Issue
Block a user