<div dir="ltr"><div class="gmail_default" style="font-size:small">Hi Malcolm,<br><br></div><div class="gmail_default" style="font-size:small">While preparing Agda for supporting GHC 7.10.1, I found the following issue on cpphs.<br><br></div><div class="gmail_default" style="font-size:small">For example, using the file <a href="https://github.com/simonmar/alex/blob/3.1.4/tests/tokens.x">https://github.com/simonmar/alex/blob/3.1.4/tests/tokens.x</a>, Alex includes the file ghcconfig.h which generates the following warning:<br><br> $ ghc --version<br> The Glorious Glasgow Haskell Compilation System, version 7.10.0.20141222<br></div><div class="gmail_default" style="font-size:small"><br> $ alex --version<br> Alex version 3.1.4, (c) 2003 Chris Dornan and Simon Marlow<br></div><br><div class="gmail_default" style="font-size:small"> $ alex Tokens.x<br><br> $ ghc -pgmP cpphs -optP --cpp Tokens.hs <br> Warning: Can't find file "/usr/local/stow/ghc-7.10.0.20141222-bin/lib/ghc-7.10.0.20141222/include/ghcversion.h" in directories<br> .<br> /usr/local/stow/ghc-7.10.0.20141222-bin/lib/ghc-7.10.0.20141222/base_469rOtLAqwTGFEOGWxSUiQ/include<br> /usr/local/stow/ghc-7.10.0.20141222-bin/lib/ghc-7.10.0.20141222/integ_21cuTlnn00eFNd4GMrxOMi/include<br> /usr/local/stow/ghc-7.10.0.20141222-bin/lib/ghc-7.10.0.20141222/include<br> Asked for by: Tokens.hs at line 1 col 1<br><br></div><div class="gmail_default" style="font-size:small">I think the above warning is unnecessary because cpphs found the file in a different directory.<br><br></div><div class="gmail_default" style="font-size:small">Notes:<br><br></div><div class="gmail_default" style="font-size:small">1. The unnecessary warning doesn't show up when using GHC 7.8.4.<br><br>2. Note that cpphs (but not cpp) correctly generates the warning<br><br> Warning: trailing characters after #if directive in file /usr/local/stow/ghc-7.10.0.20141222-bin/lib/ghc-7.10.0.20141222/include/ghcautoconf.h at line 379 col 1: AC_APPLE_UNIVERSAL_BUILD</div><div class="gmail_default" style="font-size:small"><br>(I reported this warning in <a href="https://ghc.haskell.org/trac/ghc/ticket/9213">https://ghc.haskell.org/trac/ghc/ticket/9213</a>).<br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Best,<br><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr">Andrés</div></div></div></div>
</div>