Skip to content

Pathnames beginning with more than one slash cause invalid output #4

Open

Description

@da-x

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"

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions