Patch for %P spec expansion: number of underscores: Review mi ssin g

Unruh, Erwin Erwin.Unruh@fujitsu-siemens.com
Tue Apr 9 09:21:00 GMT 2002


If only one of the last two characters is an underscore, the old code appends
the wrong number of underscores. A little table:

last chars      old code        new code

__              keep            keep
_x              add 1 '_'       add 2 '_'
x_              keep            add 1 '_'
xx              add 2 '_'       add 2 '_'

So the old code ends up with a single underscore at the end.

        Erwin

Erwin Unruh, Fujitsu Siemens Computers, C/C++ compiler group


> -----Original Message-----
> From: Zack Weinberg [mailto:zack@codesourcery.com]
> Sent: Dienstag, 9. April 2002 18:09
> To: Unruh, Erwin
> Cc: gcc-patches@gcc.gnu.org
> Subject: Re: Patch for %P spec expansion: number of 
> underscores: Review
> missin g
> 
> 
> On Tue, Apr 09, 2002 at 09:50:33AM +0200, Unruh, Erwin wrote:
> > Hello,
> > 
> > some time ago I submitted a patch to correct the handling 
> of trailing 
> > underscores in %P spec expansion. It did not get into 3.1.
> 
> Could you please say in English what is wrong with the current
> behavior?  It is not obvious from your patch.
> 
> zw
> 



More information about the Gcc-patches mailing list