Skip to content

Commit e8d0abb

Browse files
switch to safe-string by default (related to MPR#7113) (ocaml#1252)
* switch to safe-string by default
1 parent 201ee17 commit e8d0abb

File tree

7 files changed

+5
-50
lines changed

7 files changed

+5
-50
lines changed

Changes

+4
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ Working version
3838
and patterns (plus fix printing of (::) in the toplevel)
3939
(Florian Angeletti, review by Alain Frisch, Gabriel Scherer)
4040

41+
* GPR#1252: The default mode is now safe-string, can be overridden
42+
at configure time or at compile time.
43+
(Damien Doligez)
44+
4145
- GPR#1253: Private extensible variants
4246
(Leo White, review by Alain Frisch)
4347

testsuite/tests/basic/Makefile

-30
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,3 @@
1-
#**************************************************************************
2-
#* *
3-
#* OCaml *
4-
#* *
5-
#* Xavier Clerc, SED, INRIA Rocquencourt *
6-
#* *
7-
#* Copyright 2010 Institut National de Recherche en Informatique et *
8-
#* en Automatique. *
9-
#* *
10-
#* All rights reserved. This file is distributed under the terms of *
11-
#* the GNU Lesser General Public License version 2.1, with the *
12-
#* special exception on linking described in the file LICENSE. *
13-
#* *
14-
#**************************************************************************
15-
16-
all: pr6322.ml check
17-
181
BASEDIR=../..
192
include $(BASEDIR)/makefiles/Makefile.several
203
include $(BASEDIR)/makefiles/Makefile.common
@@ -25,16 +8,3 @@ include $(BASEDIR)/makefiles/Makefile.common
258
# As a temporary workaround, we skip this test.
269
SKIP=test $$file = trigraph.ml \
2710
&& test `uname -m` = i386 && test `uname -s` = OpenBSD
28-
29-
GENERATED_SOURCES=pr6322.ml *.safe-string
30-
31-
pr6322.ml: $(SAFE_STRING).safe-string
32-
ifeq ($(SAFE_STRING),false)
33-
@cat pr6322.ml.in > $@
34-
else
35-
@echo "Printf.printf \"PR#6322=Ok\\n%!\"" > $@
36-
endif
37-
38-
%.safe-string:
39-
@rm -f pr6322.ml
40-
@touch $@

testsuite/tests/basic/pr6322.ml.in

-10
This file was deleted.

testsuite/tests/basic/pr6322.reference

-1
This file was deleted.

testsuite/tests/typing-safe-linking/Makefile

-5
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,3 @@ clean:
1313

1414
BASEDIR=../..
1515
include $(BASEDIR)/makefiles/Makefile.common
16-
17-
# The second test (`A.y`) is unnecessary, indeed cannot be compiled, under -safe-string
18-
ifeq ($(SAFE_STRING),true)
19-
ADD_COMPFLAGS=-pp "sed -e '\$$d'"
20-
endif
-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
type _ t =
22
X of string
33
| Y : bytes t
4-
5-
(* It is important that the line below is the last line of the file (see Makefile) *)
6-
let y : string t = Y

utils/clflags.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ let runtime_variant = ref "";; (* -runtime-variant *)
158158

159159
let keep_docs = ref false (* -keep-docs *)
160160
let keep_locs = ref true (* -keep-locs *)
161-
let unsafe_string = ref (not Config.safe_string)
161+
let unsafe_string = ref false
162162
(* -safe-string / -unsafe-string *)
163163

164164
let classic_inlining = ref false (* -Oclassic *)

0 commit comments

Comments
 (0)