Skip to content

Commit

Permalink
gcc does not ignore # pragma clang as it should
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.r-project.org/R/trunk@87784 00db46b3-68df-0310-9c12-caf00c1e9a41
  • Loading branch information
ripley committed Feb 21, 2025
1 parent 4555d50 commit 4d63f3f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4d63f3f

Please sign in to comment.