works for gcc but not for linux and clang?