Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Minor cleanup around printing in the compiler (warnings, errors, etc) #1906
If you look at this pull request, look commit by commit.
I was trying to understand/change what gets printed in these
While working on the 3rd commit, I fixed missing warnings documentation (2nd commit) and stumbled once more on this Clflags.fast variable, whose name made sense 20 years ago when -unsafe was called -fast but not anymore, so I fixed that too (4th commit) (and while doing that renaming, I noticed that -unsafe removes the check for division and modulo by zero, which is not the documented behavior, that 0/0 is "optimized" from sigfpe to ocaml exception with -unsafe, and that this optimization happens through Sys.opaque_identity, but I didn't change these).
All commits look like nice simplifications to me, thanks!
I think that the most controversial one is 3d0299a, which adds a new warning for something that is arguably fairly inconsequential. It's not clear to me that printing a warning here is a good idea; could you maybe trace when it was added? maybe @alainfrisch has opinions as well.
Overall I like the simplifications of the code and you have clearly been very thoughful when working on this, so my vote would go to trust you and merge, even if I'm not fully convinced by the new warning. I'll let others a change to give an opinion as well.
Thanks for the review.
I'm also ok with all changes. No strong opinion on 3d0299a. It feels both a bit useless and harmless to introduce a warning for such use case. (I would have said the same thing about just dropping the previous pseudo-warning; except that it would have simplified the code instead of "complexifying" it.)
Jul 17, 2018
referenced this pull request
Mar 14, 2019
I just noticed this now, but isn't the new warning 64 not actually needed? Once upon a time the