You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 6291 Reporter:@protz Assigned to:@protz Status: assigned (set by @protz on 2014-01-09T13:10:29Z) Resolution: open Priority: normal Severity: feature Version: 4.02.0+dev Category: lexing and parsing Tags: patch Monitored by:@gasche
jonathan@ramona:~/Code/ocaml (trunk) $ cat /tmp/test.ml
let x = 0123;;
let y = 123;;
jonathan@ramona:~/Code/ocaml (trunk) $ /usr/local/bin/ocaml -warn-error /tmp/test.ml
File "/tmp/test.ml", line 1, characters 8-12:
Warning 48: 0123 looks like you wrote an octal constant.
Did you mean 0o123?
Damien, somehow I can't turn the warning off with -warn-error -48, and +48 seems to make it fatal. Am I missing something?
I forgot to mention that the patch adds documentation in the man page for warnings 46 and 47 while we're at it. I know who implemented these warnings but I won't blame them in public ;-).
I somehow suspected that if people are padding with more than one zero, they probably don't "mean" octal, but that's just a wild guess. I can warn for any leading zeroes if that sounds better.
This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc.
Original bug ID: 6291
Reporter: @protz
Assigned to: @protz
Status: assigned (set by @protz on 2014-01-09T13:10:29Z)
Resolution: open
Priority: normal
Severity: feature
Version: 4.02.0+dev
Category: lexing and parsing
Tags: patch
Monitored by: @gasche
Bug description
Following the comments from http://roscidus.com/blog/blog/2014/01/07/ocaml-the-bugs-so-far/, I implemented a new warning that is triggered by decimal constants of the form "0n..." where n <> 0.
Damien, somehow I can't turn the warning off with -warn-error -48, and +48 seems to make it fatal. Am I missing something?
File attachments
The text was updated successfully, but these errors were encountered: