Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
  • 6 commits
  • 3 files changed
  • 0 commit comments
  • 2 contributors
Commits on Jun 30, 2014
@kerneis kerneis Replace Obj.magic trick by a recursive definition 3ae4a35
@kerneis kerneis Expose parsed OCaml version 15dae13
@kerneis kerneis Fix Pretty module for OCaml 4.02
Pretty.gprintf uses the internal representation of format6 strings,
which has changed in OCaml 4.02. We check the version number and
extract the format string accordingly.
6b3638f
Commits on Jul 01, 2014
@kerneis kerneis Safer fix for Pretty module
Thanks to Xavier Leroy.
681f17e
Commits on Jul 02, 2014
@stephenrkell stephenrkell Support gnu_inline attribute
Fixes bug where this attribute would be attached to function return
types instead of the whole decl, provoking compiler warnings.
bc1cb8e
Commits on Jul 03, 2014
@kerneis kerneis Merge branch 'develop' into ptanal-fixes 3d01a40
Showing with 4 additions and 5 deletions.
  1. +1 −1 src/cil.ml
  2. +2 −3 src/mergecil.ml
  3. +1 −1 src/ocamlutil/pretty.ml
View
2 src/cil.ml
@@ -1392,7 +1392,7 @@ let attributeHash: (string, attributeClass) H.t =
List.iter (fun a -> H.add table a (AttrFunType false))
[ "format"; "regparm"; "longcall";
- "noinline"; "always_inline"; "leaf";
+ "noinline"; "always_inline"; "gnu_inline"; "leaf";
"artificial"; "warn_unused_result"; "nonnull";
];
View
5 src/mergecil.ml
@@ -124,9 +124,8 @@ let mkSelfNode (eq: (int * string, 'a node) H.t) (* The equivalence table *)
(syn: (string, 'a node) H.t) (* The synonyms table *)
(fidx: int) (name: string) (data: 'a)
(l: (location * int) option) =
- let res = { nname = name; nfidx = fidx; ndata = data; nloc = l;
- nrep = Obj.magic 1; nmergedSyns = false; } in
- res.nrep <- res; (* Make the self cycle *)
+ let rec res = { nname = name; nfidx = fidx; ndata = data; nloc = l;
+ nrep = res; nmergedSyns = false; } in
H.add eq (fidx, name) res; (* Add it to the proper table *)
if mergeSynonyms && not (prefix "__anon" name) then
H.add syn name res;
View
2 src/ocamlutil/pretty.ml
@@ -640,7 +640,7 @@ external format_float: string -> float -> string = "caml_format_float"
let gprintf (finish : doc -> 'b)
(format : ('a, unit, doc, 'b) format4) : 'a =
- let format = (Obj.magic format : string) in
+ let format = string_of_format format in
(* Record the starting align depth *)
let startAlignDepth = !alignDepth in

No commit comments for this range

Something went wrong with that request. Please try again.