LoginSignup
0

More than 1 year has passed since last update.

C++のclang++とg++でコンパイルしていて、違いを整理中。

<この項は書きかけです。順次追記します。>

Clang/Clang++(LLVM) gcc/g++(GNU) コンパイラ警告等比較
https://qiita.com/kaizen_nagoya/items/9a82b958cc3aeef0403f

clang++とg++の違いはさほどなく、C++2003とC++2017の違いにぶつかることがある。-std=c++03 -std=c++11 -std=c++17の3つの版でそれぞれコンパイルスクリプトを記述して試し始めた。

コンパイル用shell script C版(clangとgcc)とC++版(clang++とg++)
https://qiita.com/kaizen_nagoya/items/74220c0577a512c2d7da

C++2011 C++2017でコンパイルエラー C++2003でコンパイル実行可能

C++N4606 (5)2.4 Preprocessing tokens
https://qiita.com/kaizen_nagoya/items/0ff84fbd4581a600df21

C++2003でコンパイルエラー C++2011 C++2017でコンパイル実行可能

C++N4606 (6)2.13.5 String literals
https://qiita.com/kaizen_nagoya/items/9e6749696e55a0b4c8f4

C++2003, C++2011でコンパイルエラー, C++2017でコンパイル実行可能(clang++のみ)

cpprefjpのdecltypeをコンパイル試験
https://qiita.com/kaizen_nagoya/items/090909af702f0d5d8a67

参考文献

C++N4606, 2016, ISO/IEC 14882WD (1) sample coding compile list
https://qiita.com/kaizen_nagoya/items/df5d62c35bd6ed1c3d43/

C++N3242, 2011, sample code compile list on clang++ and g++
https://qiita.com/kaizen_nagoya/items/685b5c1a2c17c1bf1318

<この記事は個人の過去の経験に基づく個人の感想です。現在所属する組織、業務とは関係がありません。>

文献履歴

ver. 0.10 初稿 20180424
ver. 0.11 参考文献欄追記 20180425
ver. 0.12 cpprefjpのdecltypeをコンパイル試験 追記 20180430
ver. 0.13 ありがとう追記 20230312

最後までおよみいただきありがとうございました。

いいね 💚、フォローをお願いします。

Thank you very much for reading to the last sentence.

Please press the like icon 💚 and follow me for your happy life.

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0