]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/cp/decl.c
Wrap option names in gcc internal messages with %< and %>.
[thirdparty/gcc.git] / gcc / cp / decl.c
index 081f37cd26a0544c9ab76811d5015632af3db2e8..89edfe8ed01c32530cbb81c81252b43d67baf2a2 100644 (file)
@@ -4267,7 +4267,8 @@ cxx_init_decl_processing (void)
   if (aligned_new_threshold > 1
       && !pow2p_hwi (aligned_new_threshold))
     {
-      error ("-faligned-new=%d is not a power of two", aligned_new_threshold);
+      error ("%<-faligned-new=%d%> is not a power of two",
+            aligned_new_threshold);
       aligned_new_threshold = 1;
     }
   if (aligned_new_threshold == -1)
@@ -10170,7 +10171,7 @@ mark_inline_variable (tree decl, location_t loc)
     }
   else if (cxx_dialect < cxx17)
     pedwarn (loc, 0, "inline variables are only available "
-            "with -std=c++17 or -std=gnu++17");
+            "with %<-std=c++17%> or %<-std=gnu++17%>");
   if (inlinep)
     {
       retrofit_lang_decl (decl);
@@ -10963,8 +10964,8 @@ grokdeclarator (const cp_declarator *declarator,
          gcc_rich_location richloc (declspecs->locations[ds_virtual]);
          richloc.add_range (declspecs->locations[ds_constexpr]);
          pedwarn (&richloc, OPT_Wpedantic, "member %qD can be declared both "
-                  "%<virtual%> and %<constexpr%> only in -std=c++2a or "
-                  "-std=gnu++2a", dname);
+                  "%<virtual%> and %<constexpr%> only in %<-std=c++2a%> or "
+                  "%<-std=gnu++2a%>", dname);
        }
     }
   friendp = decl_spec_seq_has_spec_p (declspecs, ds_friend);
@@ -11331,7 +11332,7 @@ grokdeclarator (const cp_declarator *declarator,
                                      "trailing return type", name);
                            inform (typespec_loc,
                                    "deduced return type only available "
-                                   "with -std=c++14 or -std=gnu++14");
+                                   "with %<-std=c++14%> or %<-std=gnu++14%>");
                          }
                        else if (virtualp)
                          {
@@ -11402,7 +11403,7 @@ grokdeclarator (const cp_declarator *declarator,
                         always be an error.  */
                      error_at (typespec_loc,
                                "trailing return type only available "
-                               "with -std=c++11 or -std=gnu++11");
+                               "with %<-std=c++11%> or %<-std=gnu++11%>");
                    else
                      error_at (typespec_loc, "%qs function with trailing "
                                "return type not declared with %<auto%> "