[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-ed] GNU ed 1.15-pre2 released

From: Bob Proulx
Subject: Re: [Bug-ed] GNU ed 1.15-pre2 released
Date: Thu, 25 Oct 2018 18:24:24 -0600
User-agent: Mutt/1.10.1 (2018-07-13)

Antonio Diaz Diaz wrote:
> GNU ed 1.15-pre2 is ready for testing here
> http://download.savannah.gnu.org/releases/ed/ed-1.15-pre2.tar.lz
> Please, test it and report any bugs you find.

Are you interested in reports of spurious gcc warnings?  It isn't an
ed bug but rather a gcc bug.  Using gcc 6.3.0 and gcc 8.2.0 are both
opinionated about whitespace and indention and noisy compiling the
main_loop.c file.

gcc  -Wall -W -O2 -c -o main_loop.o main_loop.c
main_loop.c: In function ‘exec_command’:
main_loop.c:616:15: warning: this ‘while’ clause does not guard... 
     case '#': while( *(*ibufpp)++ != '\n' ) ;
main_loop.c:617:15: note: ...this statement, but the latter is misleadingly 
indented as if it were guarded by the ‘while’

Huh?  I disagree that the break were indented as if it were part of
the while statement since it is at the same level and not indented
beyond.  That simply looks to be an insufficiency of understanding of
indentation by gcc.  The code looks quite clear as is to me.  And
strange that gcc isn't similarly confused about the various 'if'
statements that are the same thing.  If it did/didn't approve of one
then I would think it should be the same for the other.

Since it is a gcc indentation opinion I'll note that if the ';' is put
on the next line then gcc is silent.

    case '#': while( *(*ibufpp)++ != '\n' )

And also if the label is on a line by itself.

    case '#':
              while( *(*ibufpp)++ != '\n' ) ;

I am also happy to ignore the warning too since it is completely
spurious and indicating a gcc bug rather than an ed bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]