
#11270: "Unusable UNPACK pragma" warnings should be printed even without -O -------------------------------------+------------------------------------- Reporter: osa1 | Owner: Type: feature | Status: new request | Priority: normal | Milestone: Component: Compiler | Version: 7.11 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- UNPACK pragmas are ignored when -O is not used, and this is very annoying when developing inside GHCi. Example: {{{ ➜ unpack_warning ghc-stage2 Main.hs -Wall -fforce-recomp --make [1 of 1] Compiling Main ( Main.hs, Main.o ) Linking Main ... }}} No warning printed even though I used {{{-Wall}}}. If I add {{{-O}}}: {{{ ➜ unpack_warning ghc-stage2 Main.hs -Wall -fforce-recomp --make -O [1 of 1] Compiling Main ( Main.hs, Main.o ) Main.hs:5:13: warning: • Ignoring unusable UNPACK pragma on the first argument of ‘Blah’ • In the definition of data constructor ‘Blah’ In the data type declaration for ‘Blah’ Linking Main ... }}} This is very annoying, because {{{-O}}} is ignored in GHCi: {{{ ➜ unpack_warning ghc-stage2 Main.hs -Wall -fforce-recomp -O --interactive when making flags consistent: warning: -O conflicts with --interactive; -O ignored. GHCi, version 7.11.20151220: http://www.haskell.org/ghc/ :? for help [1 of 1] Compiling Main ( Main.hs, interpreted ) Ok, modules loaded: Main. }}} So basically there's no way to get these warning in GHCi. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11270 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler