diff --git a/winsup/doc/ChangeLog b/winsup/doc/ChangeLog index c49e3b474..4cea1192a 100644 --- a/winsup/doc/ChangeLog +++ b/winsup/doc/ChangeLog @@ -1,3 +1,9 @@ +2013-04-24 Corinna Vinschen + Christian Franke + + * faq-programming.xml (faq.programming.64bitporting): Mention the + -Wformat and -Wall gcc options. + 2013-04-24 Corinna Vinschen * faq-programming.xml (faq.programming.64bitporting): New FAQ entry. diff --git a/winsup/doc/faq-programming.xml b/winsup/doc/faq-programming.xml index c46e05f18..8a1bb962b 100644 --- a/winsup/doc/faq-programming.xml +++ b/winsup/doc/faq-programming.xml @@ -115,7 +115,11 @@ datatypes when the AMD64 CPU was new. printf ("%d %ld\n", l, i); -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. + +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.