cpphs bug with pathnames beginning with more than one slash
Dan Aloni
dan at kernelim.com
Thu Jun 9 21:11:52 UTC 2016
Hi Malcolm,
If we pass pathnames starting with more than one slash to '-include',
cpphs generates invalid output. These are valid UNIX pathnames.
I've tested with version 1.20.1 on Linux.
Example:
$ touch empty.hs
$ cpphs --cpp -include //dev/null empty.hs
#line 1 "test.hs"
#line 1 "
#line 2 "test.hs"
#line 1 "test.hs"
If I remove the extra '/', I get a good output:
$ touch empty.hs
$ cpphs --cpp -include /dev/null empty.hs
#line 1 "test.hs"
#line 1 "/dev/null"
#line 2 "test.hs"
#line 1 "test.hs"
Thanks.
--
Dan Aloni
More information about the ghc-devs
mailing list