mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-09 16:41:18 +08:00
reginfo.c (fix_register): Avoid inserting English word in diagnostic sentence.
* reginfo.c (fix_register): Avoid inserting English word in diagnostic sentence. Use %qs for quoting and %'. From-SVN: r166610
This commit is contained in:
parent
12bbb78f64
commit
658bd5ca00
@ -1,3 +1,8 @@
|
||||
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
|
||||
|
@ -770,12 +770,40 @@ fix_register (const char *name, int fixed, int call_used)
|
||||
)
|
||||
&& (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;
|
||||
|
||||
error ("can't use '%s' as a %s register", name,
|
||||
what_option[fixed][call_used]);
|
||||
case 1:
|
||||
error ("can%'t use %qs as a call-used register", name);
|
||||
break;
|
||||
|
||||
default:
|
||||
gcc_unreachable ();
|
||||
}
|
||||
break;
|
||||
|
||||
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
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user