switch question in recog.c
Andrew MacLeod
amacleod@redhat.com
Tue Oct 7 18:54:00 GMT 2003
Is this really valid? Sure seems screwy to me.
in the function asm_operand_ok(), the code looks like:
<...>
case 'X':
result = 1;
case 'g':
if (general_operand (op, VOIDmode))
result = 1;
break;
default:
/* For all other letters, we first check for a register class,
otherwise it is an EXTRA_CONSTRAINT. */
if (REG_CLASS_FROM_CONSTRAINT (c, constraint) != NO_REGS)
{
case 'r':
if (GET_MODE (op) == BLKmode)
break;
if (register_operand (op, VOIDmode))
result = 1;
}
#ifdef EXTRA_CONSTRAINT_STR
if (EXTRA_CONSTRAINT_STR (op, c, constraint))
result = 1;
if (EXTRA_MEMORY_CONSTRAINT (c, constraint))
<...>
Look at where the case 'r' is.. its inside the 'default:' case. Is that
really kosher?
Andrew
More information about the Gcc
mailing list