[PATCH] D129404: Change default C dialect for PS5 to gnu17/gnu18.
Sunil Srivastava via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 8 15:28:44 PDT 2022
Sunil_Srivastava created this revision.
Sunil_Srivastava added reviewers: probinson, wristow.
Herald added a project: All.
Sunil_Srivastava requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D129404
Files:
clang/lib/Basic/LangStandards.cpp
clang/test/Preprocessor/init.c
Index: clang/test/Preprocessor/init.c
===================================================================
--- clang/test/Preprocessor/init.c
+++ 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
Index: clang/lib/Basic/LangStandards.cpp
===================================================================
--- clang/lib/Basic/LangStandards.cpp
+++ 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:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129404.443372.patch
Type: text/x-patch
Size: 1094 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220708/1d5c466f/attachment.bin>
More information about the cfe-commits
mailing list