One thing to realize in this discussion is that it is not
possible in general to warn when a programmer is depending
on undefined behavior, since by definition you cannot in
general guess what misunderstandings the programmer has
about C, and hence what behavior is expected.

There are some cases where you can guess well enough that
you can provide warnings that won't have an excessive
number of annoying false positivesm, and warnings in
such cases are appropriate.

But some contributions to this thread have seemed to
come near to a position of requiring warnings whenever
the compiler does something that might violate expectations
of a programmer writing undefined C code, and as a general
principle this is fundamentally impossible.

Reply via email to