template haskell reportWarning is not suppressed by -w
Steps to reproduce
{-# LANGUAGE TemplateHaskell #-}
{-# OPTIONS_GHC -w #-}
import Language.Haskell.TH
reportWarning "should be suppressed" >> [d| main = return () |]
runghc -w bug.hs
bug.hs:5:1: warning: should be suppressed
The warning I actually want to disable is in library code (BNFC-meta).
Environment
- GHC version used: 9.4.2