[OBVIOUS] Fix -Wformat-diag in options-save.c

Message ID bbe6f085-1390-bc17-6871-e9e086b9e2c0@suse.cz
State New
Headers show
Series
  • [OBVIOUS] Fix -Wformat-diag in options-save.c
Related show

Commit Message

Martin Liška June 11, 2020, 7:13 a.m.
The patch removes bunch of warnings:

options-save.c:12004:29: warning: unquoted identifier or keyword ‘global_options’ in format [-Wformat-diag]
12004 |     internal_error ("Error: global_options are modified in local context\n");

gcc/ChangeLog:

	* optc-save-gen.awk: Quote error string.
---
  gcc/optc-save-gen.awk | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.26.2

Patch

diff --git a/gcc/optc-save-gen.awk b/gcc/optc-save-gen.awk
index 4a0e5ab64f3..1b010085b75 100644
--- a/gcc/optc-save-gen.awk
+++ b/gcc/optc-save-gen.awk
@@ -967,7 +967,7 @@  for (i = 0; i < n_opts; i++) {
  	checked_options[name]++
  
  	print "  if (ptr1->x_" name " != ptr2->x_" name ")"
-	print "    internal_error (\"Error: global_options are modified in local context\\n\");";
+	print "    internal_error (\"%<global_options%> are modified in local context\");";
  }
  
  print "}";