This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: "format not a string literal"
- To: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Subject: Re: "format not a string literal"
- From: Eli Zaretskii <eliz at gnu dot org>
- Date: Thu, 14 Oct 1999 13:18:51 -0400
- CC: drepper at cygnus dot com, egcs-patches at egcs dot cygnus dot com, gcc-bugs at sourceware dot cygnus dot com
- References: <199910141700.NAA28874@caip.rutgers.edu>
> 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.