Proposal and patch: Allow whitespace in md constraints

Hans-Peter Nilsson hp@bitrange.com
Mon Feb 14 12:48:00 GMT 2000


Thank you for reviewing this.

On Mon, 14 Feb 2000, Michael Meissner wrote:
> On Mon, Feb 14, 2000 at 06:09:32AM -0500, Hans-Peter Nilsson wrote:
> > +    Use a simple method since we will not use it for large data.  */
> > + strip_whitespace (s)

> On the other hand I don't like this particular implementation.  First of all,
> you can't assume the use of memmove in the gen* programs ...

Oops missed that.  Doh.

> It also is inefficient that it calls memmove and strlen for each
> space character found.

I believe part of good hacking is knowing when *not* to search further for
a more spiffy implementation.  I didn't bother this time, since this code
is only used briefly when building the compiler.  The head-comment warned
that it's not supposed to scale to large data.  Anyway, with memmove
gone, your solution is the most straightforward one.

>  A better implementation would be:

Ok, then.  Is it ok to commit, replacing strip_whitespace with your
implementation?  I'll add you to the ChangeLog entry, if you don't mind.

brgds, H-P



More information about the Gcc-patches mailing list