gmacros: Prioritize the usage of [[noreturn]] in C++11

We defined G_NO_RETURN as [[noreturn]] in the C++ case, but only after
trying the __attribute__ syntax, so it was never used in GNUC compatible
compilers.

Give it priority instead when supporting a C++11 compiler and onwards.

As per this we need to adapt the code in the places where it was not
properly used (leading to compilation warnings).
This commit is contained in:
Marco Trevisan (Treviño)
2022-09-14 01:59:24 +02:00
parent 372ab7a964
commit 641256ea22
4 changed files with 8 additions and 9 deletions

View File

@@ -541,8 +541,8 @@ void g_assertion_message (const char *domain,
int line,
const char *func,
const char *message) G_ANALYZER_NORETURN;
GLIB_AVAILABLE_IN_ALL
G_NORETURN
GLIB_AVAILABLE_IN_ALL
void g_assertion_message_expr (const char *domain,
const char *file,
int line,