The attached patch fixes quoting, spelling, and other formatting
issues in diagnostics issued by the Brig front end and pointed
out by the -Wformat-diag warning.

Martin
gcc/brig/ChangeLog:

	* brigfrontend/brig-control-handler.cc
	(brig_directive_control_handler::operator): Remove trailing newline
	from a diagnostic.
	* brigfrontend/brig-module-handler.cc
	(brig_directive_module_handler::operator): Remove a duplicated space
	from a diagnostic.

diff --git a/gcc/brig/brigfrontend/brig-control-handler.cc b/gcc/brig/brigfrontend/brig-control-handler.cc
index 38039315c7c..4374c469a39 100644
--- a/gcc/brig/brigfrontend/brig-control-handler.cc
+++ b/gcc/brig/brigfrontend/brig-control-handler.cc
@@ -102,7 +102,7 @@ brig_directive_control_handler::operator () (const BrigBase *base)
       /* Unimplemented.  */
       break;
     default:
-      sorry ("Unsupported control directive %x.\n", inst->control);
+      sorry ("Unsupported control directive %x.", inst->control);
     }
   return base->byteCount;
 }
diff --git a/gcc/brig/brigfrontend/brig-module-handler.cc b/gcc/brig/brigfrontend/brig-module-handler.cc
index 58a65d65574..e1551b93812 100644
--- a/gcc/brig/brigfrontend/brig-module-handler.cc
+++ b/gcc/brig/brigfrontend/brig-module-handler.cc
@@ -28,10 +28,10 @@ brig_directive_module_handler::operator () (const BrigBase *base)
   const BrigDirectiveModule* mod = (const BrigDirectiveModule*)base;
   m_parent.m_module_name = m_parent.get_string (mod->name).substr (1);
   if (mod->hsailMajor != 1 || mod->hsailMinor != 0)
-    fatal_error (UNKNOWN_LOCATION, PHSA_ERROR_PREFIX_INCOMPATIBLE_MODULE " "
+    fatal_error (UNKNOWN_LOCATION, PHSA_ERROR_PREFIX_INCOMPATIBLE_MODULE
 		 "HSAIL version not supported. HSAIL 1.0 required.");
   if (mod->machineModel != BRIG_MACHINE_LARGE)
-    fatal_error (UNKNOWN_LOCATION, PHSA_ERROR_PREFIX_INCOMPATIBLE_MODULE " "
+    fatal_error (UNKNOWN_LOCATION, PHSA_ERROR_PREFIX_INCOMPATIBLE_MODULE
 		 "Only HSA 'large' machine model supported.");
   /* Do not check for the profile as the runtime conformance suite tests
      with 'full' profile BRIGs even though they don't use any full profile

Reply via email to