[Git][ghc/ghc][wip/testsuite-validate-regparm] rts: fix validate build with gcc 16. `__attribute__((regparm(1)))` is ignored on x86_64 and now
Zubin pushed to branch wip/testsuite-validate-regparm at Glasgow Haskell Compiler / GHC Commits: 4ccb6634 by Zubin Duggal at 2026-06-10T21:54:27+05:30 rts: fix validate build with gcc 16. `__attribute__((regparm(1)))` is ignored on x86_64 and now gcc warns that it is ignored: rts/sm/Evac.h:35:1: error: error: ‘regparm’ attribute ignored [-Werror=attributes] See https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=ccead81bbc39668376eb5cf47066ac... Fixes #27366 - - - - - 1 changed file: - rts/sm/Evac.h Changes: ===================================== rts/sm/Evac.h ===================================== @@ -25,7 +25,9 @@ // registers EAX, EDX, and ECX instead of on the stack. Functions that // take a variable number of arguments will continue to be passed all of // their arguments on the stack. -#if defined(x86_64_HOST_ARCH) || defined(i386_HOST_ARCH) +// On x86-64 the attribute has no effect (the first argument is already +// passed in a register) and GCC 16 warns that it is ignored. +#if defined(i386_HOST_ARCH) #define REGPARM1 __attribute__((regparm(1))) #else #define REGPARM1 View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/4ccb6634c53cfdeb34a2b045a4b68fed... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/4ccb6634c53cfdeb34a2b045a4b68fed... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Zubin (@wz1000)