Commit Graph

8054 Commits (60dca0a103670161a8c2fb2b0edb4452567ec039)

Author SHA1 Message Date
Damien Doligez e6c0b95f40 PR#5455: .emacs instructions, add lines to recognize ocaml scripts
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11979 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-29 22:10:39 +00:00
Damien Doligez 0c7984afc6 PR#5453: configure doesn't find X11 under Ubuntu/MultiarchSpec
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11978 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-29 20:42:11 +00:00
Alain Frisch 83d48700ff Replace existing warnings 26, 27, trying to preserve their semantics.
- Warning 26 detects unused variables bound by 'let' or 'as'. In case of a or-pattern,
  a variable is considered to be an "as" variable or not according to the lhs pattern only.

- Warning 27 detects unused variables bound by 'match', 'fun', 'function', and self-variable
  in objects.

- When several values are bound by a given let pattern: if all of them are unused,
  warning 26 is trigerred; if at least one of them is used, the other unused ones
  are reported with warning 27.

This commit also introduces dedicated warnings for unused ancestor variables (objects) and
for-loop indices.




git-svn-id: http://caml.inria.fr/svn/ocaml/branches/unused_declarations@11976 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-29 17:49:58 +00:00
Alain Frisch 12d6154526 Remove some useless declarations of recursive functions (now captured with warning 26).
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/unused_declarations@11975 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-29 17:35:15 +00:00
Jacques Garrigue a18ae2e959 patch to move id creation to the C side
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11974 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-29 06:49:06 +00:00
Wojciech Meyer b33b2cc8b9 Fix PR#5454: Update docs
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11973 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-29 03:13:41 +00:00
Wojciech Meyer 3542301ef7 PR#5454: Update Change log. Correct order of one of the bug fixes
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11972 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-29 03:13:40 +00:00
Wojciech Meyer c1eebeea60 Fix PR#5454: Add compare to Digest and allow to pass directly Digest to Set.Make and Map.Make
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11971 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-29 03:10:49 +00:00
Alain Frisch 957db9c0f5 Forget warning 33 in -warn-help.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/unused_declarations@11970 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-28 14:22:38 +00:00
Alain Frisch 350f214671 More clever algorithm to detect unused (recursive) type declarations.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/unused_declarations@11969 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-28 14:20:53 +00:00
Alain Frisch 33eefe4874 Remove unused constructors in the AST: Cf_let, Pcf_let.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11968 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-28 13:27:07 +00:00
Damien Doligez 6e7e555206 formatting and annotation of incompatible changes
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11967 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-28 13:24:26 +00:00
Xavier Leroy c3ead2a680 PR#5325 ("remove" solution).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11966 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-28 10:38:55 +00:00
Xavier Leroy c98f6f3161 Somewhat related to PR#5179: replace "diff -q" with "$(DIFF)" so that under Windows DIFF can be overriden by something that ignores CRLF/LF differences.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11965 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-28 08:47:03 +00:00
Jacques Garrigue 3a5aff77d0 fix PR#5449
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11964 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-28 02:22:38 +00:00
Alain Frisch 8fed6ffdfc Fix detection of unused let-bound variables in classes.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/unused_declarations@11963 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-27 10:20:21 +00:00
Alain Frisch 36c49108db Detect unused 'ancestor' identifier.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/unused_declarations@11962 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-27 09:50:40 +00:00
Alain Frisch d3e3438903 Reduce overhead for warning on unused opens when the warning is disabled.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/unused_declarations@11961 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-27 09:17:49 +00:00
Alain Frisch 7f7dc416fd Reverting the let.expr syntax (no consensus on the proposal). Sorry for the noise.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11960 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-27 09:08:34 +00:00
Jacques Garrigue dd29cb76ea A small patch to call 'bind' for syntax 'let x <- expr in cont'
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11959 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-27 08:54:18 +00:00
Jacques Garrigue 76ac0c7cb1 fix PR#5450
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11958 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-27 08:52:45 +00:00
Jacques Garrigue efc180b48b simplify fix of PR#5445
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11957 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-27 07:12:06 +00:00
Jacques Garrigue c663cf6997 fix PR#5445
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11956 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-27 07:02:11 +00:00
Jonathan Protzenko bc8d8e957e Fix #5171: Map: avoid unnecessary uses of the user-provided comparison function in [join].
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11955 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-23 20:54:57 +00:00
Jérémie Dimino 3bea22baaf PR#5442: strings must be escaped when the ast meta-expansed by Camlp4
Because strings in the Camlp4 Ast are escaped.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11948 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-23 16:30:23 +00:00
Jonathan Protzenko 632cea70f8 Followup fix to #5437: make sure [align] doesn't add padding to undocumented options, so that these don't show up when passed to [parse] or [usage].
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11946 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-23 13:34:13 +00:00
Jérémie Dimino 7396974e1a PR#5120: fix the output function of Camlp4.Debug.formatter
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11945 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-22 21:11:29 +00:00
Wojciech Meyer ddc66298a3 PR#5313: Add Change log entry
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11943 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-22 19:11:30 +00:00
Wojciech Meyer 4f0bc4465f Fix PR#5313: Run the rest of the ocamlopt optimisations even when -g flag is specifed
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11942 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-22 19:11:29 +00:00
Alain Frisch e84536543a The implicit type created by class and class types definitions is marked as used when the class or class type are referenced.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/unused_declarations@11941 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-22 16:04:25 +00:00
Alain Frisch 85a99d7bd4 Detected unused type declarations. A type declaration can be used (1) through an explicit reference, (2) during signature comparison, or (3) because one of the labels or fields it defines are referenced.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/unused_declarations@11940 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-22 15:42:40 +00:00
Jonathan Protzenko b47d5b20f2 Fix #5437: when registering an option with Arg, if the option has an empty doc string, do not include it when printing the usage.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11939 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-22 14:04:18 +00:00
Alain Frisch 86d04b3c90 Detect unused open (#5357, #5438).
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/unused_declarations@11937 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-22 11:04:20 +00:00
Xavier Leroy bc02593570 PR#5345: optimize checkbound for constant indices.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11934 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-22 09:36:45 +00:00
Alain Frisch ec02bc1f8d Clarify doc about Oo.id (#5436).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11933 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-22 09:30:51 +00:00
Xavier Leroy 5c0f191601 PR#5360: on 64-bit platforms, generate more compact code for Parrayrefs and Parraysets.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11932 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-22 09:14:22 +00:00
Xavier Leroy 38e4e84f7e PR#5179 continued: no extra stack adjustment in caml_c_call
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11931 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-22 08:51:57 +00:00
Jacques Garrigue 16d937aa40 fix PR#5436
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11930 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-22 07:30:18 +00:00
Alain Frisch 5686436fc6 Undoing previous commit.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/unused_declarations@11929 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-21 16:52:10 +00:00
Alain Frisch 1061c39aac Check for unused value declaration in interface files.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/unused_declarations@11928 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-21 16:35:36 +00:00
Xavier Leroy ac0aa0778d PR#5179: giant steps towards a Mingw64 port.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11927 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-21 16:31:01 +00:00
Alain Frisch debacec776 Typo.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/unused_declarations@11926 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-21 16:28:04 +00:00
Jonathan Protzenko 253e88bc67 Fix #5393: make sure -R is only passed to the linker with a BSD that has a BSD userland
Patch by: Stéphane Glondu <stephane@glondu.net>

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11925 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-21 15:56:10 +00:00
Alain Frisch f8a7879fb0 New warning 31 to detect a lot more unused value declarations.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/unused_declarations@11924 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-21 15:40:54 +00:00
Damien Doligez 19e2bca8ea correct syntax highlighting in emacs (continued)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11923 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-21 15:39:12 +00:00
Damien Doligez cca0035fbb continuing to change the name to OCaml
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11922 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-21 15:37:54 +00:00
Damien Doligez a85549ccf6 cygwin is changing from Windows-based to X-based tcl/tk
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11921 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-21 15:30:54 +00:00
Jérémie Dimino 72865b7342 PR#5410: fix printing of class application with Camlp4
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11917 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-21 13:15:57 +00:00
Jonathan Protzenko 35e8dcc6e3 Fix #5382: EOPNOTSUPP and ENOTSUPP different on exotic platforms (Solaris, GNU/Hurd).
Patch by Samuel Thibault <sthibault@debian.org>

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11915 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-21 13:08:48 +00:00
Xavier Leroy e43dd3a2a1 OCaml, not Objective Caml, I get it.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11914 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-21 10:41:59 +00:00