This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: "format not a string literal"


> Please do not consider this as punishment, it is a benefit.  Legal C
> is not necessarily good C and the warning code is full of stuff which
> attempts to encourage better practices which produce code which is
> less bug prone and more legible and maintainable.

Thanks for the explanations.

However, I think that if a compiler cannot feasibly check the code, it
is not a reason good enough for it to issue a warning.  Warnings should,
IMHO, be issued only when the compiler *can* analyze the code and the
analysis shows that it is buggy or dubious.

In the case in point, as far as I understand, the compiler expects me
to prove that I'm innocent, and until and unless I do that, it treats
my code as guilty.  I don't think it is a good attitude.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]