diff --git a/clang/lib/Basic/LangStandards.cpp b/clang/lib/Basic/LangStandards.cpp --- a/clang/lib/Basic/LangStandards.cpp +++ b/clang/lib/Basic/LangStandards.cpp @@ -61,8 +61,8 @@ if (CLANG_DEFAULT_STD_C != LangStandard::lang_unspecified) return CLANG_DEFAULT_STD_C; - // The PS4 and PS5 use C99 as the default C standard. - if (T.isPS()) + // The PS4 uses C99 as the default C standard. + if (T.isPS4()) return LangStandard::lang_gnu99; return LangStandard::lang_gnu17; case Language::ObjC: diff --git a/clang/test/Preprocessor/init.c b/clang/test/Preprocessor/init.c --- a/clang/test/Preprocessor/init.c +++ b/clang/test/Preprocessor/init.c @@ -1342,7 +1342,8 @@ // PS4:#define __SSE2__ 1 // PS4:#define __SSE_MATH__ 1 // PS4:#define __SSE__ 1 -// PS4:#define __STDC_VERSION__ 199901L +// PS4ONLY:#define __STDC_VERSION__ 199901L +// PS5ONLY:#define __STDC_VERSION__ 201710L // PS4:#define __UINTMAX_TYPE__ long unsigned int // PS4:#define __USER_LABEL_PREFIX__ // PS4:#define __WCHAR_MAX__ 65535