Commit Graph

10705 Commits (459061e182aebb646fbd460ffa1822a6d19c9a3f)

Author SHA1 Message Date
Gabriel Scherer 459061e182 update changelog for PR#207 (coloring messages)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16350 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-15 15:57:55 +00:00
Gabriel Scherer c508c47101 colorize error and warning messages, refactor Location
(Simon Cruanes)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16349 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-15 15:57:53 +00:00
Gabriel Scherer cb3bb152ab add option handling for colors in compiler, OCAMLPARAM and ocamlbuild
(Simon Cruanes and Gabriel Scherer)

Use one of
  -color auto
  -color always
  -color never

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16348 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-15 15:57:51 +00:00
Gabriel Scherer 5893536b14 add Color module Misc
(Simon Cruanes)

We use bold magenta for warnings, because it works on terminals with
white background.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16347 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-15 15:57:49 +00:00
Gabriel Scherer a69e3e3099 add primitive caml_sys_isatty; fix bootstrap
(Simon Cruanes)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16346 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-15 15:57:47 +00:00
Gabriel Scherer 3211f63a31 dynlink/Makefile: make dynlink.cmi depend on dynlinkaux.cmi to avoid -jN races
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16345 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-15 15:57:45 +00:00
Gabriel Scherer 365cd572d7 ocamlbuild: add examples to the documentation of rule definitions
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16344 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-15 10:26:32 +00:00
Gabriel Scherer ca7b3c1980 add release dates to Changelog
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16343 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-09 11:41:12 +00:00
Gabriel Scherer 162cbc8d1e minor: explicit a precondition on rootlist->level to please Clang analyzer
globroots.c:98:21: warning: Dereference of undefined pointer value
    e->forward[i] = update[i]->forward[i];
                    ^~~~~~~~~~~~~~~~~~~~~

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16336 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-05 07:50:23 +00:00
Gabriel Scherer 7a87170dfc fix the backtrace.c fix
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16335 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-05 07:50:21 +00:00
Gabriel Scherer 64eed3f20f fix an issue spotted by the Clang analyzer (assigned value never read)
yacc/reader.c:922:9: warning: Value stored to 'value' is never read
        value = UNDEFINED;
        ^       ~~~~~~~~~

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16334 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-04 20:32:12 +00:00
Gabriel Scherer 1714cfa5ec fix an issue spotted by the Clang analyzer (leak in yacc/reader.c)
yacc/reader.c:1328:7: warning: Potential leak of memory pointed to by 'a_line'
      fprintf(f, ")\n# 0\n              ");
      ^~~~~~~

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16333 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-04 20:32:11 +00:00
Gabriel Scherer 32511c53af fix an issue spotted by the Clang analyzer (potential malloc(0) call)
byterun/backtrace.c:142:12: warning: Call to 'malloc' has an allocation size of 0 bytes
  events = malloc(*num_events * sizeof(struct ev_info));
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16332 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-04 20:32:09 +00:00
Xavier Leroy 0178ea4e8e unix_gethostbyname: using a variable outside of its scope.
In the case HAS_GETHOSTBYNAME_R == 6, hp may point into h or into buffer,
so don't end the scope of h and buffer before hp is used.



git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16327 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-04 11:41:55 +00:00
Gabriel Scherer 57ddbfe12c more CAMLnoreturn_end goodness
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16326 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-04 10:10:14 +00:00
Xavier Leroy ac62e93d6b Fix call to undeclared function "caml_ml_enable_runtime_warnings" in startup_aux.c
This is a follow-up to commit r16245, PR#6902, GPR#210.
- Runtime warning machinery was local to io.c; make it globally usable.
- Move definitions and accessor functions to misc.c and gc_ctrl.c
  by analogy with other configurable runtime parameters.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16325 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-04 09:38:23 +00:00
Gabriel Scherer 465e34a590 GPR#221: add forgotten CAMLnoreturn_end
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16321 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-03 10:06:58 +00:00
Gabriel Scherer 1957021b27 make alldepend
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16318 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-02 18:34:09 +00:00
Gabriel Scherer 12663d47ef update Changes to record the potentially-breaking change of GPR#155
* PR#6816: reject identifiers following numeric literals without spacing, e.g.
      let foo = 1 in (fun a b -> a,b) 23foo
    (Hugo Heuzard)

(Thanks to Daniel Bünzli for reminding me.)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16317 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-02 17:18:44 +00:00
Gabriel Scherer 3c4e307bfd update Changes
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16316 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-02 16:54:25 +00:00
Gabriel Scherer 6e224a76a1 GPR#221: use CAMLnoreturn_{start,end} in the same way as CAMLunused_{start,end}
This is ugly. C pragmas are ugly. At least we're ugly and consistent now.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16315 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-02 16:54:24 +00:00
Gabriel Scherer 2f2b2f0bd1 GPR#165: refactor and document CAMLunused{,_start,_end}
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16314 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-02 16:54:22 +00:00
Gabriel Scherer edb714dc15 GPR#221: keep Noreturn and add CAMLnoreturn_{start,end}
(Bernhard Schommer)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16313 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-02 16:54:20 +00:00
Gabriel Scherer 98456ca63b GPR#165: reintroduce 'CAMLunused' for backward compatibility reasons.
(Bernhard Schommer)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16312 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-02 16:54:18 +00:00
Gabriel Scherer 90062a8a43 GPR#212 Emitaux: also emit column location
(Frédéric Bour)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16311 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-02 15:37:02 +00:00
Gabriel Scherer ed057488f2 Order type variables in format parameters
(Maxence Guesdon)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16310 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-02 15:37:00 +00:00
Gabriel Scherer 0b1575a6b0 GPR#201: Keep general types of Printf.{ifprintf,ikfprintf}
(Maxence Guesdon)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16309 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-02 15:36:58 +00:00
Gabriel Scherer 370677b639 PR#6649, GPR#222: accept (int_of_string "+3")
(Christopher McAlpine)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16308 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-02 13:32:44 +00:00
Gabriel Scherer 60314e38c5 fix -dsource error on recursive modules
(Hongbo Zhang)

when printing recursive module the old version would print no space
before 'and':
  A : ... = struct
    ...
  endand B : ... = ...

this tiny PR fixes such problem

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16307 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-02 13:05:53 +00:00
Gabriel Scherer 5756c0ae69 update Changes
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16306 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-02 13:05:51 +00:00
Gabriel Scherer 36d53043b2 ocamlbuild: + Log.is_logging to skip allocation in hot path
(user 'ygrek')

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16305 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-02 13:05:50 +00:00
Gabriel Scherer c2704c259b ocamlbuild: Log: do not wrap format unless it will be used
(user 'ygrek')

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16304 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-02 13:05:48 +00:00
Gabriel Scherer 7569a5f7a0 ocamlbuild: specialize Hashtbl for Resource.Cache
(user 'ygrek')

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16303 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-02 13:05:47 +00:00
Gabriel Scherer a3041d9550 Added the missing POSIX signals in Sys (Guillaume Bury)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16302 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-02 13:05:45 +00:00
Damien Doligez 1326b12f74 merge branch 4.02 from rev 16205 to rev 16238
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16296 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-29 22:19:24 +00:00
Xavier Leroy 688d5a5915 Changed OCamlbuild's license to LGPL with static linking exception.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16294 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-28 13:18:34 +00:00
Xavier Leroy 047749ec9a Of--by-one-bit error in two_power_m1_big_int, causing out-of-bound write if n is a multiple of length_of_digit.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16293 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-28 11:52:21 +00:00
Alain Frisch ef5bfc9a66 #6940: fix regression on 32-bit machine related to new unboxing strategy.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16292 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-28 10:56:23 +00:00
Xavier Leroy c157926a36 float_of_big_int: for negative arguments, the top 55 bits must round towards -inf, otherwise wrong rounding occurs. Hence, use shift_right_big_int and not shift_right_towards_zero_big_int.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16284 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-28 07:49:50 +00:00
Damien Doligez debaf6edb2 fix regression test for PR#6938 for 32-bit machines
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16283 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-27 18:44:10 +00:00
Xavier Leroy 66e958ef0f Still following up on commit 16278.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16282 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-27 17:25:17 +00:00
Alain Frisch b71ce51227 Hopefully finish 16278 (again).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16281 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-27 16:48:32 +00:00
Alain Frisch 2b25dd5d4a Hopefully finish 16278.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16280 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-27 16:35:28 +00:00
Xavier Leroy 7027b858eb Update "register_class" followign the introduction of the Val machine type.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16278 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-27 11:37:52 +00:00
Alain Frisch 438cbf52cc Rvert 16273. gasche pointed to a counterexample: 'let rec x = (x;1)'.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16277 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-27 11:33:21 +00:00
Alain Frisch 76e5208983 Cosmetic.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16276 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-27 10:40:48 +00:00
Alain Frisch a32821b740 Inline transl_unbox_let to clarify code.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16275 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-27 10:16:57 +00:00
Alain Frisch 1a31367f74 Allow unbox in let-rec bindings, for uniformity.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16274 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-27 10:12:35 +00:00
Alain Frisch acab661fed Fix suspicious (harmless) case in cmm-compilation of letrec.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16273 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-27 09:58:07 +00:00
Xavier Leroy bd88ddb4fb Mention commit r16269 (merge of GPR#115).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16272 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-27 09:44:20 +00:00