This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Be less conservative in process_{output,input}_constraints (PR target/65689)


On Wed, Apr 08, 2015 at 05:12:07PM -0500, Segher Boessenkool wrote:
> On Wed, Apr 08, 2015 at 11:00:59PM +0200, Jakub Jelinek wrote:
> > +    case MATCH_CODE:
> > +      if (*XSTR (exp, 1) == '\0')
> > +	{
> > +	  const char *code, *codes = XSTR (exp, 0);
> > +	  int ret = 0;
> > +	  while ((code = scan_comma_elt (&codes)) != 0)
> > +	    if (strncmp (code, "reg", 3) == 0
> > +		&& (code[3] == ',' || code[3] == '\0' || code[3] == ' '))
> 
> This doesn't allow other whitespace.  Maybe it's cleaner written as e.g.
> 
> 	&& codes - code == 3

... and that doesn't handle trailing whitespace.  Ugh.


Segher


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]