
#11270: "Unusable UNPACK pragma" warnings should be printed even without -O -------------------------------------+------------------------------------- Reporter: osa1 | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by osa1):
Are you saying that you want GHC to do all the checks that it would have done if it had been optimising, even though it will then ignore the results?
Yes! In my opinion -Wall should check for all the warnings, no matter which optimization setting is used. Why? Because in my experience, this happens a lot: Programs are developed with -O0 or a similar parameter that reduces compilation times, to be able to iterate faster. Then programs would be compiled with -O before distribution (or before testing etc.). Currently what happens is you develop a program using -O0, but just when you think you're done and you can move to the testing you start getting warnings. This is very annoying IMO. We can improve the warning messages by maybe saying something like: "Unusable UNPACK ... Note that UNPACK pragmas are only effective with -O or higher". (the second part is only printed in -O0) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11270#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler