https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64885
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> --- Simply including <bits/gthr.h> first (as suggested in PR 64883 comment 10) causes a different error, because the gthr headers don't have #pragma GCC system_header and so the way <ext/rope> uses __GTHREAD_MUTEX_INIT causes a warning if that macro is first defined outside a system header. I think the right fix is to replace ((unused)) with ((__unused__)) in gthr-single.h There are other gthreads headers with the same problem: ../libgcc/config/gthr-vxworks.h:#define UNUSED(x) x __attribute__((unused)) ../libgcc/config/i386/gthr-win32.h: void (*__dtor) (void *) __attribute__((unused)))