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. _______________________________________________ bug-ed mailing list [email protected] https://lists.gnu.org/mailman/listinfo/bug-ed
