]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Avoid -Wformat-diag.
authorMartin Sebor <msebor@redhat.com>
Wed, 5 Jan 2022 20:28:37 +0000 (13:28 -0700)
committerMartin Sebor <msebor@redhat.com>
Wed, 5 Jan 2022 20:32:24 +0000 (13:32 -0700)
gcc/ChangeLog:
* gimple-ssa-warn-access.cc (pass_waccess::maybe_warn_memmodel): Use
%qs to avoid -Wformat-diag.

gcc/gimple-ssa-warn-access.cc

index 9f06ee80a80930274197260d412a28975746e54d..e4c078a8e43c3453e0d7858ddab9737a7070e095 100644 (file)
@@ -2841,7 +2841,7 @@ pass_waccess::maybe_warn_memmodel (gimple *stmt, tree ord_sucs,
       for (unsigned i = 0; valid[i] != UCHAR_MAX; ++i)
        {
          const char *modname = memory_models[valid[i]].modname;
-         pp_printf (&pp, "%s%<%s%>", i ? ", " : "", modname);
+         pp_printf (&pp, "%s%qs", i ? ", " : "", modname);
        }
 
       inform (loc, "valid models are %s", pp_formatted_text (&pp));