Skip to content
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

ocamlyacc generates code that is not warning 33-compliant #5719

Closed
vicuna opened this issue Aug 6, 2012 · 1 comment
Closed

ocamlyacc generates code that is not warning 33-compliant #5719

vicuna opened this issue Aug 6, 2012 · 1 comment
Assignees

Comments

@vicuna
Copy link

vicuna commented Aug 6, 2012

Original bug ID: 5719
Reporter: prevosto
Assigned to: @damiendoligez
Status: closed (set by @damiendoligez on 2012-08-06T14:20:17Z)
Resolution: fixed
Priority: low
Severity: tweak
Version: 4.00.0
Fixed in version: 4.00.1+dev
Category: tools (ocaml{lex,yacc,dep,debug,...})
Monitored by: @yakobowski

Bug description

ocamlyacc systematically open Parsing in the generated file. However, it also uses fully qualified names in the generated code, so that open Parsing is flagged as useless by warning 33, unless user actions use functions from the Parsing module without prefix.

@vicuna
Copy link
Author

vicuna commented Aug 6, 2012

Comment author: @damiendoligez

This is only true if you override the default "parse_error" function, and it's a bit tricky to resolve without breaking any existing code and without triggering warning 5. Here's what I've done: add "let _ = parse_error;;" right after "open Parsing;;" to silence the warning without removing the open.

Fixed in 4.00 and trunk (r 12834 and r 12835).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants