Re: WIP pgindent replacement
От
Bruce Momjian
Тема
Re: WIP pgindent replacement
Дата
Msg-id
201106221308.p5MD8lP12565@momjian.us
Ответ на
Re: WIP pgindent replacement (Andrew Dunstan)
Список
Дерево обсуждения
WIP pgindent replacement Andrew Dunstan <andrew@dunslane.net>
Re: WIP pgindent replacement Tom Lane <tgl@sss.pgh.pa.us>
Re: WIP pgindent replacement Andrew Dunstan <andrew@dunslane.net>
Re: WIP pgindent replacement Bruce Momjian <bruce@momjian.us>
Re: WIP pgindent replacement Bruce Momjian <bruce@momjian.us>
Re: WIP pgindent replacement Andrew Dunstan <andrew@dunslane.net>
Re: WIP pgindent replacement Bruce Momjian <bruce@momjian.us>
Re: WIP pgindent replacement Tom Lane <tgl@sss.pgh.pa.us>
Re: WIP pgindent replacement Bruce Momjian <bruce@momjian.us>
Re: WIP pgindent replacement Andrew Dunstan <andrew@dunslane.net>
Re: WIP pgindent replacement Bruce Momjian <bruce@momjian.us>
Re: WIP pgindent replacement Andrew Dunstan <andrew@dunslane.net>
Re: WIP pgindent replacement Bruce Momjian <bruce@momjian.us>
Re: WIP pgindent replacement Bruce Momjian <bruce@momjian.us>
Re: WIP pgindent replacement Robert Haas <robertmhaas@gmail.com>
Re: WIP pgindent replacement David Christensen <david@endpoint.com>
Re: WIP pgindent replacement Andrew Dunstan <andrew@dunslane.net>
Re: WIP pgindent replacement Andrew Dunstan <andrew@dunslane.net>
Re: WIP pgindent replacement Bruce Momjian <bruce@momjian.us>
Re: WIP pgindent replacement Andrew Dunstan <andrew@dunslane.net>
Re: WIP pgindent replacement Bruce Momjian <bruce@momjian.us>
Re: WIP pgindent replacement Bruce Momjian <bruce@momjian.us>
Andrew Dunstan wrote: > > > On 06/22/2011 08:35 AM, Andrew Dunstan wrote: > > > > > > On 06/22/2011 02:03 AM, David Christensen wrote: > >>> # Avoid bug that converts 'x =- 1' to 'x = -1' > >>> $source =~ s!=- !-= !g; > >> > >> I haven't looked at the shell script this replaces, but is that the > >> correct substitution pattern? (BTW, I'm not seeing the token =- > >> anywhere except in the Makefile, which wouldn't be run against, no? > >> Am I missing something?) > >> > >> > > > > > > It's exactly what the current script does. The reason you don't see > > this anywhere is that previous pgindent runs have removed it. We don't > > undo the transformation. But maybe we should just get rid of it. > > > > > > Further research shows that C89 explicitly dropped support for the old > K&R "=-" operator, so we probably *should* remove this in case it > introduces an unintended bug. Well, the point is if someone does use that, it isn't going to generate a pgindent error, but rather produce incorrect C code because =- is going to be changed. FYI, my gcc 2.95.3 allows =- and does work as intended. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. +
В списке pgsql-hackers по дате отправления