]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c++/69865 (-trigraphs option broken)
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Fri, 19 Feb 2016 22:22:04 +0000 (22:22 +0000)
committerBernd Edlinger <edlinger@gcc.gnu.org>
Fri, 19 Feb 2016 22:22:04 +0000 (22:22 +0000)
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

gcc/c-family/ChangeLog
gcc/c-family/c-opts.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/Wshift-negative-value-6.c

index 90dd7fd0385be0f33f63f20a61586adc62ef690c..f3dd70965e25994a24ee798fe0198a11ae04ba8d 100644 (file)
@@ -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
index 8cc28aff6000ce829e3e841cd6b06910005441ce..c2783f7e5603be64a8af2b6e8fcb95b31f3b5516 100644 (file)
@@ -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";
 }
index 27b0027802fb914de40e6b41cb565f2ba2794c9e..021ee48628c3296fe1ad7a5f4e880116d64c0de8 100644 (file)
@@ -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
index de9db528cb833ab70e02bd6eb6ee7b9958b16c34..3603b9ed98f64c38d6c7b0aa5c1a406e3e97c037 100644 (file)
@@ -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 {