1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-11 22:31:12 +02:00
guile/module/language/tree-il
Ludovic Courtès e06972410a Implement fancy format string analysis.
* module/language/tree-il/analyze.scm (format-string-argument-count):
  Return two values, the minimum and maximum number of arguments.
  Add support for most of `format' escapes, including conditionals.
  (format-analysis): Adjust accordingly.

* module/system/base/message.scm (%warning-types)[format]: Take two
  arguments, MIN and MAX, instead of EXPECTED.  Display warning
  accordingly.

* test-suite/tests/tree-il.test ("warnings")["format"]("~%, ~~, ~&, ~t,
  ~_, and ~\\n", "~{...~}", "~{...~}, too many args", "~@{...~}",
  "~@{...~}, too few args", "~(...~)", "~v", "~v:@y", "~*", "~?",
  "complex 1", "complex 2", "complex 3"): New tests.
  ("conditionals"): New test prefix.
2010-10-10 19:10:10 +02:00
..
analyze.scm Implement fancy format string analysis. 2010-10-10 19:10:10 +02:00
compile-glil.scm Add `-Wformat'. 2010-10-08 16:25:57 +02:00
fix-letrec.scm compiler support for letrec* 2010-06-17 13:43:26 +02:00
inline.scm add inliner cases for conditionals 2010-06-11 16:58:31 +02:00
optimize.scm compilation enviroments are always modules; simplifications & refactorings 2009-10-16 15:33:32 +02:00
primitives.scm inline symbol? and vector? to opcodes, and a psyntax inlining tweak 2010-10-08 12:31:56 +02:00
spec.scm remove `version' field from <language> 2010-05-02 11:19:13 +02:00