[PATCH] D155539: [CUDA][HIP] Use the same default language std as C++

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 17 19:47:25 PDT 2023


yaxunl created this revision.
yaxunl added a reviewer: tra.
Herald added subscribers: mattd, carlosgalvezp.
Herald added a project: All.
yaxunl requested review of this revision.

Currently CUDA/HIP defines their own language standards in LanguageStandards.def but they are redundant. They are the same as stdc++14. The fact that CUDA/HIP uses c++* in option `-std=` indicates that they have the same language standards as C++. The CUDA/HIP specific language features are conveyed through language options, not language standards features. It makes sense to let CUDA/HIP uses the same default language standard as C++.


https://reviews.llvm.org/D155539

Files:
  clang/include/clang/Basic/LangStandards.def
  clang/lib/Basic/LangStandards.cpp
  clang/test/CodeGenCUDA/long-double.cu
  clang/test/Driver/unknown-std.cpp
  clang/test/Preprocessor/lang-std.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155539.541240.patch
Type: text/x-patch
Size: 4374 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230718/d9502b5f/attachment-0001.bin>


More information about the cfe-commits mailing list