0002-set-c-default-standard-to-c-14.patch 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. From 5fb88421181bac4a3cf160f9b52258f23c06dd05 Mon Sep 17 00:00:00 2001
  2. From: "max.ma" <max.ma@starfivetech.com>
  3. Date: Wed, 6 Jul 2022 19:26:53 -0700
  4. Subject: [PATCH 02/11] set c++ default standard to c++14
  5. ---
  6. gcc/doc/invoke.texi | 2 +-
  7. gcc/doc/standards.texi | 2 +-
  8. gcc/testsuite/lib/target-supports.exp | 2 +-
  9. 3 files changed, 3 insertions(+), 3 deletions(-)
  10. diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
  11. index 07b440190c3..490287b85d1 100644
  12. --- a/gcc/doc/invoke.texi
  13. +++ b/gcc/doc/invoke.texi
  14. @@ -2446,6 +2446,7 @@ The name @samp{c++1y} is deprecated.
  15. @item gnu++14
  16. @itemx gnu++1y
  17. GNU dialect of @option{-std=c++14}.
  18. +This is the default for C++ code.
  19. The name @samp{gnu++1y} is deprecated.
  20. @item c++17
  21. @@ -2456,7 +2457,6 @@ The name @samp{c++1z} is deprecated.
  22. @item gnu++17
  23. @itemx gnu++1z
  24. GNU dialect of @option{-std=c++17}.
  25. -This is the default for C++ code.
  26. The name @samp{gnu++1z} is deprecated.
  27. @item c++20
  28. diff --git a/gcc/doc/standards.texi b/gcc/doc/standards.texi
  29. index f878615ca30..fd6d270a567 100644
  30. --- a/gcc/doc/standards.texi
  31. +++ b/gcc/doc/standards.texi
  32. @@ -254,7 +254,7 @@ select an extended version of the C++ language explicitly with
  33. @option{-std=gnu++20} (for C++20 with GNU extensions).
  34. The default, if
  35. -no C++ language dialect options are given, is @option{-std=gnu++17}.
  36. +no C++ language dialect options are given, is @option{-std=gnu++14}.
  37. @section Objective-C and Objective-C++ Languages
  38. @cindex Objective-C
  39. diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
  40. index 2d5d0539bb4..f59ef570aa5 100644
  41. --- a/gcc/testsuite/lib/target-supports.exp
  42. +++ b/gcc/testsuite/lib/target-supports.exp
  43. @@ -10153,7 +10153,7 @@ proc check_effective_target_c++ { } {
  44. return 0
  45. }
  46. -set cxx_default "c++17"
  47. +set cxx_default "c++14"
  48. # Check whether the current active language standard supports the features
  49. # of C++11/C++14 by checking for the presence of one of the -std flags.
  50. # This assumes that the default for the compiler is $cxx_default, and that
  51. --
  52. 2.25.1