| Anonymous | Login | Signup for a new account | 2013-06-18 23:57 CEST | ![]() |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | |||
| 0004200 | OCaml | OCaml general | public | 2007-01-27 13:22 | 2009-03-31 13:02 | |||
| Reporter | dra | |||||||
| Assigned To | maranget | |||||||
| Priority | normal | Severity | text | Reproducibility | always | |||
| Status | closed | Resolution | fixed | |||||
| Platform | OS | OS Version | ||||||
| Product Version | 3.09.3 | |||||||
| Target Version | Fixed in Version | 3.10.0 | ||||||
| Summary | 0004200: Incorrect source file reference for OCaml warning Y (unused variable name) with ocamllex | |||||||
| Description | If you bind a portion of a matched regular expression to a variable (e.g. [^ 'a'-'z' ]+ as name) and then don't use it in the lexer action block ({...}) then ocamlc issues Warning Y (by default) when you compile the .ml file. The line number and file given for this warning refer to the ocamllex-compiled ML file and not to the actual source .mll file as other errors and warnings do. ocamllex should insert additional # statements in the ML file before each "let foo = Lexing.sub_lexeme ..." line in its ML output. | |||||||
| Additional Information | Of course, just inserting # {line} "{file}.mll" still means that the character reference number would be wrong, though I'm sure that some trickery with whitespace can be done to engineer the variable name in the ML file being at the same place as in the .mll file to fix this too! Definitely a cosmetic change, though... | |||||||
| Tags | No tags attached. | |||||||
| Attached Files | ||||||||
Notes |
|
|
(0003903) maranget (manager) 2007-01-29 17:44 |
Arguably this is a bug, or at least a misfeature. Thank you for reporting it. I have modified ocamllex so as to yield source (.mll) locations for variables that are bound with 'as'. Committed in 3.10 branch. --LM |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2007-01-27 13:22 | dra | New Issue | |
| 2007-01-29 11:38 | maranget | Assigned To | => maranget |
| 2007-01-29 11:38 | maranget | Status | new => assigned |
| 2007-01-29 17:44 | maranget | Note Added: 0003903 | |
| 2007-01-29 17:45 | maranget | Status | assigned => resolved |
| 2007-01-29 17:45 | maranget | Resolution | open => fixed |
| 2009-03-31 13:02 | xleroy | Status | resolved => closed |
| 2009-03-31 13:02 | xleroy | Fixed in Version | => 3.10.0 |
| Copyright © 2000 - 2011 MantisBT Group |