summaryrefslogtreecommitdiffstats
path: root/stdlib
diff options
context:
space:
mode:
authorGabriel Scherer <gabriel.scherer@gmail.com>2014-05-12 15:37:49 +0000
committerGabriel Scherer <gabriel.scherer@gmail.com>2014-05-12 15:37:49 +0000
commitfa67173b240995c60c6a002263fad7bd5b8625e8 (patch)
treeb5f21cb5b730041c9b77451081456e0bfb941015 /stdlib
parentb3b3518c29ad426ef508fa4b6786b43a8cbe0aec (diff)
ignore more incompatible flags
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14816 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'stdlib')
-rw-r--r--stdlib/camlinternalFormat.ml8
1 files changed, 6 insertions, 2 deletions
diff --git a/stdlib/camlinternalFormat.ml b/stdlib/camlinternalFormat.ml
index 206a3a626..9ddcf748d 100644
--- a/stdlib/camlinternalFormat.ml
+++ b/stdlib/camlinternalFormat.ml
@@ -1468,8 +1468,12 @@ let fmt_ebb_of_string str =
let get_pad_opt c = match get_pad () with
| No_padding -> None
| Lit_padding (Right, width) -> Some width
- | Lit_padding (Zeros, _) -> incompatible_flag pct_ind str_ind c "'0'"
- | Lit_padding (Left, _) -> incompatible_flag pct_ind str_ind c "'-'"
+ | Lit_padding (Zeros, width) ->
+ if legacy_behavior then Some width
+ else incompatible_flag pct_ind str_ind c "'0'"
+ | Lit_padding (Left, width) ->
+ if legacy_behavior then Some width
+ else incompatible_flag pct_ind str_ind c "'-'"
| Arg_padding _ -> incompatible_flag pct_ind str_ind c "'*'"
in