This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Empty loop elimination in 4.0 ?
Michael Veksler dixit:
>> > Another example, with C macros. I assume that with -DNDEBUG
>> > assert(x) is empty:
>> >
>> > for (p: iterates over elements)
>> > assert(p->value != NULL); /* Will warn with -DNDEBUG */
>> >
>> > /* Should I add "#ifndef NDEBUG" to protect the loop? */
>Also, most macros can be written in a way that does not produce
>warnings. Not with this warning message.
And the people who are suffering are the OS developers
who add -Werror to CFLAGS for the sake of correctness.
Good job on gcc 3.4 by the way (compared to 3.2), thanks.
//mirabile