http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57316
--- Comment #16 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Sorry for not catching it earlier, I'm worried about -Wunused complaining about the vars. Can you instead use something like int x = syscall (__NR_gettid); syscall (__NR_futex, &x, 1, 1); syscall (__NR_exit_group, 0); ? Please post to gcc-patches with the change (if it works). Thanks.