mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-23 18:52:09 +01:00
Merge branch 'msvc-cxx-use-native-attribute-specifiers' into 'main'
gmacros: Use C++ namespaces attribute specifier sequences for msvc See merge request GNOME/glib!3086
This commit is contained in:
commit
2ee44ba1d5
@ -1157,7 +1157,11 @@
|
||||
# endif
|
||||
#elif defined (_MSC_VER)
|
||||
/* Use MSVC specific syntax. */
|
||||
# if G_CXX_STD_CHECK_VERSION (11) && _MSC_VER >= 1927
|
||||
# define G_ALWAYS_INLINE [[msvc::forceinline]]
|
||||
# else
|
||||
# define G_ALWAYS_INLINE __forceinline
|
||||
# endif
|
||||
#else
|
||||
# define G_ALWAYS_INLINE /* empty */
|
||||
#endif
|
||||
@ -1197,6 +1201,12 @@
|
||||
/* Use ISO C++11 syntax when the compiler supports it. */
|
||||
# if defined (__GNUC__)
|
||||
# define G_NO_INLINE [[gnu::noinline]]
|
||||
# elif defined (_MSC_VER)
|
||||
# if _MSC_VER >= 1927
|
||||
# define G_NO_INLINE [[msvc::noinline]]
|
||||
# else
|
||||
# define G_NO_INLINE __declspec (noinline)
|
||||
# endif
|
||||
# endif
|
||||
# else
|
||||
# define G_NO_INLINE __attribute__ ((__noinline__))
|
||||
@ -1204,7 +1214,11 @@
|
||||
#elif defined (_MSC_VER) && (1200 <= _MSC_VER)
|
||||
/* Use MSVC specific syntax. */
|
||||
/* Use ISO C++11 syntax when the compiler supports it. */
|
||||
# if G_CXX_STD_CHECK_VERSION (11) && _MSC_VER >= 1927
|
||||
# define G_NO_INLINE [[msvc::noinline]]
|
||||
# else
|
||||
# define G_NO_INLINE __declspec (noinline)
|
||||
# endif
|
||||
#else
|
||||
# define G_NO_INLINE /* empty */
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user