name lookup of 'i' changed for new ISO 'for' scoping

majenko:
So how would you suggest suppressing a warning for

for(ptr=head; ptr->next; ptr++);

?

By the way, the precompiler strips all comments, so putting comments in something is a futile exercise.

Only if the preprocessor (or precompiler as you call it) is a separate program from the main compiler, which is rarely the case these days.

majenko:
An empty block gets reduced to an end of statement (;).

It may be treated in the same way as end-of-statement in some contexts, but the compiler knows the difference, so it is easy for the compiler writter to generate a warning in one case but not in the other.

majenko:
You can't have a warning for something that is valid, just because in that one specific situation the programmer used it wrong.

Rubbish. There are very many things that are valid in C++ but symptomatic of possible or likely errors, and all good C++ compilers can warn about many of them. You can choose to run the compiler at its minimum warning level and see none of these warnings, or the maximum warning level and see all of them, or somewhere in between. See Warning Options (Using the GNU Compiler Collection (GCC)) for the warning options supported by the gcc compiler used by the Arduino IDE. In particular, note the following:

-Wall
This enables all the warnings about constructions that some users consider questionable, and that are easy to avoid (or modify to prevent the warning), even in conjunction with macros.