+2010-11-11 Joseph Myers <joseph@codesourcery.com>
+
+ * reginfo.c (fix_register): Avoid inserting English word in
+ diagnostic sentence. Use %qs for quoting and %'.
+
2010-11-11 H.J. Lu <hongjiu.lu@intel.com>
* config/i386/driver-i386.c (host_detect_local_cpu): Support
)
&& (fixed == 0 || call_used == 0))
{
- static const char * const what_option[2][2] = {
- { "call-saved", "call-used" },
- { "no-such-option", "fixed" }};
+ switch (fixed)
+ {
+ case 0:
+ switch (call_used)
+ {
+ case 0:
+ error ("can%'t use %qs as a call-saved register", name);
+ break;
+
+ case 1:
+ error ("can%'t use %qs as a call-used register", name);
+ break;
+
+ default:
+ gcc_unreachable ();
+ }
+ break;
- error ("can't use '%s' as a %s register", name,
- what_option[fixed][call_used]);
+ case 1:
+ switch (call_used)
+ {
+ case 1:
+ error ("can%'t use %qs as a fixed register", name);
+ break;
+
+ case 0:
+ default:
+ gcc_unreachable ();
+ }
+ break;
+
+ default:
+ gcc_unreachable ();
+ }
}
else
{