New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wrong error locations and ghost locations #5142
Comments
Comment author: till The problem seems to be in the code that merges the locations. A simpler test of appears to be the same bug would be: tmp> cat t.ml The attached patch should fix this. |
Comment author: @ygrek Hm, am I the only one to think that { (b) with stop = b.stop } is waste of characters (whatever b is)? |
Comment author: till Indeed. That's because this line should have been: |
Comment author: till It turns out that keeping the ghost=True in the resulting location is also important (although I couldn't really figure out where it was used in camlp4). Hopefully that's the last regression on that bug fix. I'll upload a patch with the bootstrapping soon. |
Comment author: till Seems fixed in the 3.12 svn (at least for my problem cases). |
Comment author: @damiendoligez The second problem is fixed in 3.12.1 and the first one in 4.00.0. |
Original bug ID: 5142
Reporter: Hendrik Tews
Assigned to: @xclerc
Status: closed (set by @damiendoligez on 2012-09-19T12:05:39Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 3.12.0
Target version: 4.00.1+dev
Category: -for Camlp4 use https://github.com/ocaml/camlp4/issues
Related to: #5090
Monitored by: @gasche "Alexander Ulrich" "Sergey Plaksin" hnrgrgr @ygrek furuse @mjambon
Bug description
Try to compile Loc.ml from the ocaml sources! The first point is
that the (* camlp4r *) comment at the top of the file is
misleading. Needed is actually camlp4r Camlp4DebugParser.cmo!
A first run of
ocamlc -c -pp 'camlp4rf Camlp4DebugParser.cmo' Loc.ml
gives
However, the unknown identifier Camlp4_import is on line 176. The
location reported here is wrong.
The next try with
gives
The filename and the characters are wrong here, though the line
number is correct.
File attachments
The text was updated successfully, but these errors were encountered: