Re: [hackers] [patch][scc] fix parsing end of comment

From: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
Date: Thu, 16 Jul 2015 07:36:27 +0200

Hi,

On Thu, Jul 16, 2015 at 12:19:45AM +0100, Dimitris Papastamos wrote:
> > diff --git a/cc1/lex.c b/cc1/lex.c
> > index c35e401..111c6f8 100644
> > --- a/cc1/lex.c
> > +++ b/cc1/lex.c
> > _AT_@ -184,8 +184,8 @@ comment(char type)
> > {
> > if (type == '*') {
> > while (!eof) {
> > - while (readchar() != '*' && !eof)
> > - /* nothing */


wow, I cannot believe this was written in this way. I suppose
there are millions of errors in the code now, because I was in an
expansion phase.
I usually work in this projects in two phases, one phase of
adding functionality, without checking too much, and then another
phase of checking and rewriting. If I try to keep it working
perfectly and well written, it is impossible to advance.

> I would have put the semicolon on the same line as the while.

This is something of style. I took this style from the source
code of git, and I think it is also used in the kernel, isn't it?.
I don't have problems if it is changed.


Regards
Received on Thu Jul 16 2015 - 07:36:27 CEST

This archive was generated by hypermail 2.3.0 : Thu Jul 16 2015 - 07:48:10 CEST