|
From: | Antonio Diaz Diaz |
Subject: | Re: [Bug-ed] GNU ed 1.15-pre2 released |
Date: | Sun, 28 Oct 2018 11:33:20 +0100 |
User-agent: | Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 |
Hi Bob, Bob Proulx wrote:
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... [-Wmisleading-indentation] 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’ break; ^~~~~
This is indeed a bug in gcc. I reported it in 2016[1], and I am surprised that it is not yet fixed in gcc 8.2.0.
[1]http://gcc.gnu.org/ml/gcc/2016-05/msg00045.html
That simply looks to be an insufficiency of understanding of indentation by gcc.
-Wmisleading-indentation already made compilation a 1% slower last time I tested it. Making it more sophisticated will probably make it slower. I would be happy to see -Wmisleading-indentation taken out of -Wall.
Thanks. Antonio.
[Prev in Thread] | Current Thread | [Next in Thread] |