allows some more ignored formats

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14817 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Gabriel Scherer 2014-05-12 15:37:50 +00:00
parent fa67173b24
commit 689d9aff79
1 changed files with 6 additions and 1 deletions

View File

@ -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 '@'). *)