converting from gcc to clang