mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-09-06 16:08:43 +02:00
Merge branch 'wip/3v1n0/sys-64-clang' into 'main'
gatomic: Cast the oldval pointer type to the atomic value type, and add msys2-clang64 scheduled CI job Closes #2798 See merge request GNOME/glib!3031
This commit is contained in:
@@ -241,7 +241,8 @@ G_END_DECLS
|
||||
* https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1715#note_1024120. */
|
||||
#define g_atomic_pointer_compare_and_exchange(atomic, oldval, newval) \
|
||||
(G_GNUC_EXTENSION ({ \
|
||||
G_STATIC_ASSERT (sizeof (oldval) == sizeof (gpointer)); \
|
||||
G_STATIC_ASSERT (sizeof (static_cast<glib_typeof (*(atomic))>((oldval))) \
|
||||
== sizeof (gpointer)); \
|
||||
glib_typeof (*(atomic)) gapcae_oldval = (oldval); \
|
||||
G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gpointer)); \
|
||||
(void) (0 ? (gpointer) *(atomic) : NULL); \
|
||||
|
@@ -1143,7 +1143,7 @@ write_to_file (const gchar *contents,
|
||||
{
|
||||
gssize s;
|
||||
|
||||
s = write (fd, contents, MIN (length, G_MAXSSIZE));
|
||||
s = write (fd, contents, MIN (length, G_MAXSIZE));
|
||||
|
||||
if (s < 0)
|
||||
{
|
||||
|
@@ -3,6 +3,13 @@
|
||||
extra_gnulib_args = cc.get_supported_arguments([
|
||||
'-Wno-format-nonliteral', '-Wno-duplicated-branches'])
|
||||
|
||||
if host_system == 'windows' and cc.get_id() == 'clang'
|
||||
extra_gnulib_args += cc.get_supported_arguments([
|
||||
'-Wno-unused-but-set-variable',
|
||||
'-Wno-implicit-fallthrough',
|
||||
])
|
||||
endif
|
||||
|
||||
math_h_config = configuration_data ()
|
||||
|
||||
unneeded_funcs = [
|
||||
|
@@ -186,7 +186,11 @@ test_steal_pointer (void)
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
#if __cplusplus >= 201103L
|
||||
g_test_init (&argc, &argv, NULL);
|
||||
#else
|
||||
g_test_init (&argc, &argv, static_cast<void *>(NULL));
|
||||
#endif
|
||||
|
||||
g_test_add_func ("/C++/typeof", test_typeof);
|
||||
g_test_add_func ("/C++/atomic-pointer-compare-and-exchange", test_atomic_pointer_compare_and_exchange);
|
||||
|
Reference in New Issue
Block a user