Re: genmatch indent generated code

2015-07-10 Thread Michael Matz
Hi, On Fri, 10 Jul 2015, Richard Biener wrote: > > I also noticed it but didn't care ;) But now I notice > > > > switch (TREE_CODE (t)) > > { > > case SSA_NAME: > > > > cases are indented too much, it should be > > > > switch (TREE_CODE (t)) > > { > > case SSA_NAME: I like

Re: genmatch indent generated code

2015-07-10 Thread Richard Biener
On Fri, Jul 10, 2015 at 10:45 AM, Richard Biener wrote: > On Thu, Jul 9, 2015 at 5:23 PM, Michael Matz wrote: >> Hi, >> >> On Thu, 9 Jul 2015, Jakub Jelinek wrote: >> >>> That violates the coding style by not using tabs ;) >> >> I knew it! Somebody would notice, pffft. Fixed in the committed ve

Re: genmatch indent generated code

2015-07-10 Thread Richard Biener
On Thu, Jul 9, 2015 at 5:23 PM, Michael Matz wrote: > Hi, > > On Thu, 9 Jul 2015, Jakub Jelinek wrote: > >> That violates the coding style by not using tabs ;) > > I knew it! Somebody would notice, pffft. Fixed in the committed version. I also noticed it but didn't care ;) But now I notice

Re: genmatch indent generated code

2015-07-09 Thread Michael Matz
Hi, On Thu, 9 Jul 2015, Jakub Jelinek wrote: > That violates the coding style by not using tabs ;) I knew it! Somebody would notice, pffft. Fixed in the committed version. Ciao, Michael. PS: this still isn't fully correct, as sometimes I start the strings with spaces which don't count towar

Re: genmatch indent generated code

2015-07-09 Thread Jakub Jelinek
On Thu, Jul 09, 2015 at 02:20:08PM +0200, Michael Matz wrote: > +/* Like fprintf, but print INDENT spaces at the beginning. */ > + > +static void > +#if GCC_VERSION >= 4001 > +__attribute__((format (printf, 3, 4))) > +#endif > +fprintf_indent (FILE *f, unsigned int indent, const char *format, ...)

Re: genmatch indent generated code

2015-07-09 Thread Jeff Law
On 07/09/2015 06:20 AM, Michael Matz wrote: Hi, while looking at gimple-match.c I got a minor stroke, so this patch makes genmatch generated (mostly) properly indented code. Sure, it could be done post-fact by an editor or something when one looks at the file, but all other generators also try

Re: genmatch indent generated code

2015-07-09 Thread Richard Biener
On Thu, Jul 9, 2015 at 2:20 PM, Michael Matz wrote: > Hi, > > while looking at gimple-match.c I got a minor stroke, so this patch makes > genmatch generated (mostly) properly indented code. Sure, it could be > done post-fact by an editor or something when one looks at the file, but > all other ge

genmatch indent generated code

2015-07-09 Thread Michael Matz
Hi, while looking at gimple-match.c I got a minor stroke, so this patch makes genmatch generated (mostly) properly indented code. Sure, it could be done post-fact by an editor or something when one looks at the file, but all other generators also try to generate good looking code. No functio