This is the mail archive of the 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]

projects.html patch: add format checking todo list

This patch adds my current format checking todo list to projects.html.  
OK to commit?

--- projects.html	Fri Sep 15 09:22:18 2000
+++ projectsnew.html	Fri Sep 15 21:02:22 2000
@@ -79,6 +79,95 @@
 <p>Contact <a href=""></a> if
 you're interested in working on lazy code motion.
+<h2>Format (<code>printf</code>, <code>scanf</code> and
+<code>strftime</code>) checking:</h2>
+<p>Contact <a href=""></a> before
+doing any substantial format checking work.
+<li>Move details of flag characters from code into data.</li>
+<li>The code checking a type should be shared by both the main
+checking of an argument type and the checking for width/precision
+<li>Try to eliminate from <code>check_format_info</code> all
+conditionals on any particular format type.</li>
+<li>Warning for wide string literals with narrow formats.</li>
+<li><code>printf</code> <code>%m</code> with <code>$</code> operand
+numbers should be allowed.</li>
+<li>Provide a usable format-checking interface returning a status code
+instead of diagnostics.</li>
+<li>Make re-entrant: eliminate global state used for <code>$</code>
+format checking.</li>
+<li><code>strftime</code>: warnings for more than one of
+<code>0</code>, <code>-</code>, <code>_</code> flags; more than one of
+<code>#</code>, <code>^</code> flags; <code>0</code>, <code>-</code>,
+<code>_</code> flags without width on formats where inappropriate.
+<li>glibc <code>scanf</code> extension flags <code>'</code> and
+<li>Check formats where the format string is a conditional expression,
+e.g. <code>printf(nfoo > 1 ? "%d foos" : "%d foo", nfoo)</code>.</li>
+<li><code>intmax_t</code>, <code>%j</code> and
+See <a href=";pr=448&amp;database=gcc">PR c/448</a>.</li>
+<li>Someone who knows C++ should compare the format checking (used by
+both C and C++) against the C++ standard requirements.  (Pedantic
+messages should not be referring to ISO C when the language used is
+C++.  At least some of the tree nodes used need to be created by some
+function shared between the C and C++ front ends, but at present are
+only created for C.)</li>
+<li>For bounded pointers: check that all levels of pointers in the
+list of format argument have the correct boundedness
+<li>Meaning of "quad" and <code>%q</code>: anything more accurate than
+<code>long long</code>?  See messages <a
+href="">1</a> and
+<a href="">2</a>
+about this to gcc-bugs.  (Note that <code>%q</code> is now largely
+obsolete given the new C99 formats and macros.)</li>
+<li>Wide string format support.</li>
+<li>Fix <code>format-va-1.c</code> (see <a
+<li>Handle format attributes on function pointers and typedefs; see <a
+href="">a message about
+this</a>.  Of course, this should be done so as to work for both C++
+and C.</li>
+<li>Get Marc Espie's <code>__attribute__((__nonnull__))</code> patch
+in (he may be working on a cleaner version that applies to current
+sources).  See messages <a
+and <a
+to gcc-patches.</li>
+<li>(Maybe eventually:) Extensible format checking: allow programs
+such as OS kernels and parts of GCC to tell GCC about additional
+format conversion characters recognised by their format
 <h2>The old PROJECTS file.</h2>  Stuff I know has been done has been deleted.

Joseph S. Myers

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