* faq-programming.xml (faq.programming.64bitporting): Mention the

-Wformat and -Wall gcc options.
This commit is contained in:
Corinna Vinschen 2013-04-24 17:33:30 +00:00
parent 895ece0124
commit 21470a3ca9
2 changed files with 11 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2013-04-24 Corinna Vinschen <corinna@vinschen.de>
Christian Franke <Christian.Franke@t-online.de>
* faq-programming.xml (faq.programming.64bitporting): Mention the
-Wformat and -Wall gcc options.
2013-04-24 Corinna Vinschen <corinna@vinschen.de>
* faq-programming.xml (faq.programming.64bitporting): New FAQ entry.

View File

@ -115,7 +115,11 @@ datatypes when the AMD64 CPU was new.</para>
printf ("%d %ld\n", l, i);
</screen>
may not print what you think it should.
may not print what you think it should. Enable the gcc options -Wformat or
-Wall, which warn about type mismatches in printf/scanf functions.
<note>Using -Wall (optionally with -Werror to drive the point home) makes a
lot of sense in general, not only when porting code to a new platform.</note>
</para></listitem>
<listitem><para>