From 4d63f3f3a670220cc63f9df5e02de12732b3b621 Mon Sep 17 00:00:00 2001 From: ripley Date: Fri, 21 Feb 2025 13:13:39 +0000 Subject: [PATCH] gcc does not ignore # pragma clang as it should git-svn-id: https://svn.r-project.org/R/trunk@87784 00db46b3-68df-0310-9c12-caf00c1e9a41 --- src/main/memory.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/memory.c b/src/main/memory.c index c22c316a3b..9752ecd6c6 100644 --- a/src/main/memory.c +++ b/src/main/memory.c @@ -2358,7 +2358,9 @@ long double *R_allocLD(size_t nelem) #elif __GNUC__ // This is C99, but do not rely on it. // Apple clang warns this is gnu extension. + #ifdef __clang__ # pragma clang diagnostic ignored "-Wgnu-offsetof-extensions" + #endif size_t ld_align = offsetof(struct { char __a; long double __b; }, __b); #else size_t ld_align = 0x0F; // value of x86_64, known others are 4 or 8