<div dir="ltr"><div>On SmartOS GHC flag warnings show up like this:</div><div><div>/tmp/ghc72341_0/ghc_1.hscpp:7:16: Warning:</div><div>    -fffi is deprecated: use -XForeignFunctionInterface or pragma {-# LANGUAGE ForeignFunctionInterface #-} instead</div></div><div><br></div><div>It appears that this line in DriverPipeline leads to the correct filename in warnings on Ubuntu, but not on SmartOS:<br></div><div>src_opts <- liftIO $ getOptionsFromFile dflags0 output_fn</div><div><a href="https://github.com/ghc/ghc/blob/bb7f2e33197e667eb694bd1243f125c722a0a868/compiler/main/DriverPipeline.hs#L865">https://github.com/ghc/ghc/blob/bb7f2e33197e667eb694bd1243f125c722a0a868/compiler/main/DriverPipeline.hs#L865</a></div><div><br></div><div>How does the intermediate hscpp filename get restored to a correct filename if warnings are generated during a re-read of the pragmas after having preprocessed the file?</div><div><br></div><div>Full investigation notes are here (rambling and unedited):</div><a href="https://gist.github.com/AlainODea/98141991849093285c52">https://gist.github.com/AlainODea/98141991849093285c52</a><br></div>