aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorBernd Edlinger <bernd.edlinger@hotmail.de>2016-02-19 22:22:04 +0000
committerBernd Edlinger <edlinger@gcc.gnu.org>2016-02-19 22:22:04 +0000
commit268be88cbeaba7cd59cec138908c1e1f66c42e38 (patch)
tree52c1bafc2c2ef2a034da78df2e955610cb2fe7b0 /gcc
parentf3609a89f45eef81bf76ee2d1aed4f6d50b5f8fd (diff)
downloadgcc-268be88cbeaba7cd59cec138908c1e1f66c42e38.zip
gcc-268be88cbeaba7cd59cec138908c1e1f66c42e38.tar.gz
gcc-268be88cbeaba7cd59cec138908c1e1f66c42e38.tar.bz2
re PR c++/69865 (-trigraphs option broken)
gcc/c-family/ChangeLog: 2016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de> PR c++/69865 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from here... (c_common_init_options): ...to here. (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99. gcc/testsuite/ChangeLog: 2016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de> PR c++/69865 * c-c++-common/Wshift-negative-value-6.c: Add -std=c++11 before -std=c++03. From-SVN: r233574
Diffstat (limited to 'gcc')
-rw-r--r--gcc/c-family/ChangeLog8
-rw-r--r--gcc/c-family/c-opts.c10
-rw-r--r--gcc/testsuite/ChangeLog6
-rw-r--r--gcc/testsuite/c-c++-common/Wshift-negative-value-6.c2
4 files changed, 21 insertions, 5 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index 90dd7fd..f3dd709 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -1,3 +1,11 @@
+2016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
+
+ PR c++/69865
+ * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
+ here...
+ (c_common_init_options): ...to here.
+ (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
+
2016-02-19 Jakub Jelinek <jakub@redhat.com>
PR c++/69826
diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c
index 8cc28af..c2783f7 100644
--- a/gcc/c-family/c-opts.c
+++ b/gcc/c-family/c-opts.c
@@ -246,6 +246,10 @@ c_common_init_options (unsigned int decoded_options_count,
}
}
+ /* Set C++ standard to C++14 if not specified on the command line. */
+ if (c_dialect_cxx ())
+ set_std_cxx14 (/*ISO*/false);
+
global_dc->colorize_source_p = true;
}
@@ -802,10 +806,6 @@ c_common_post_options (const char **pfilename)
&& flag_no_builtin)
flag_tree_loop_distribute_patterns = 0;
- /* Set C++ standard to C++14 if not specified on the command line. */
- if (c_dialect_cxx () && cxx_dialect == cxx_unset)
- set_std_cxx14 (/*ISO*/false);
-
/* -Woverlength-strings is off by default, but is enabled by -Wpedantic.
It is never enabled in C++, as the minimum limit is not normative
in that standard. */
@@ -1519,6 +1519,8 @@ set_std_cxx98 (int iso)
flag_no_gnu_keywords = iso;
flag_no_nonansi_builtin = iso;
flag_iso = iso;
+ flag_isoc94 = 0;
+ flag_isoc99 = 0;
cxx_dialect = cxx98;
lang_hooks.name = "GNU C++98";
}
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 27b0027..021ee48 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
+
+ PR c++/69865
+ * c-c++-common/Wshift-negative-value-6.c: Add -std=c++11 before
+ -std=c++03.
+
2016-02-19 Jakub Jelinek <jakub@redhat.com>
PR c++/69826
diff --git a/gcc/testsuite/c-c++-common/Wshift-negative-value-6.c b/gcc/testsuite/c-c++-common/Wshift-negative-value-6.c
index de9db52..3603b9e 100644
--- a/gcc/testsuite/c-c++-common/Wshift-negative-value-6.c
+++ b/gcc/testsuite/c-c++-common/Wshift-negative-value-6.c
@@ -1,7 +1,7 @@
/* PR c/65179 */
/* { dg-do compile } */
/* { dg-options "-O -Wextra" } */
-/* { dg-additional-options "-std=c++03" { target c++ } } */
+/* { dg-additional-options "-std=c++11 -std=c++03" { target c++ } } */
/* { dg-additional-options "-std=c90" { target c } } */
enum E {