From 689d9aff79e802ca51a9105780e529e08fdc80aa Mon Sep 17 00:00:00 2001 From: Gabriel Scherer Date: Mon, 12 May 2014 15:37:50 +0000 Subject: allows some more ignored formats git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14817 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02 --- stdlib/camlinternalFormat.ml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'stdlib/camlinternalFormat.ml') diff --git a/stdlib/camlinternalFormat.ml b/stdlib/camlinternalFormat.ml index 9ddcf748d..81bd9f1a8 100644 --- a/stdlib/camlinternalFormat.ml +++ b/stdlib/camlinternalFormat.ml @@ -1666,7 +1666,12 @@ let fmt_ebb_of_string str = as ignoring it would typically result in a different typing than what the legacy parser used *) if not !ign_used && ign then - incompatible_flag pct_ind str_ind symb "'_'"; + begin match symb with + (* argument-less formats can safely be ignored in legacy mode *) + | ('@' | '%' | '!' | ',') when legacy_behavior -> () + | _ -> + incompatible_flag pct_ind str_ind symb "'_'" + end; fmt_result (* Parse formatting informations (after '@'). *) -- cgit v1.2.3-70-g09d2