patch to warn about direct compare of string literal

Andrew Morton
Sun Oct 31 23:33:00 GMT 1999

A general point:  I believe that new versions of the compiler should
_not_ start sprouting new warnings in this way.

This is because it leaves the owners of large codebases with a stark

a: Go through the code and fix everything, which you may have strong
reasons against doing or

b: Let the warnings scroll past, almost certainly causing your
developers to miss important ones.

New warnings are great, but they should be selectable from the
invokation environment.


(who _still_ needs to edit and retest a zillion files to get rid of
"warning: `class foo' only defines a private destructor and has no

More information about the Gcc-patches mailing list