[llvm-bugs] [Bug 47723] New: -include doesn't work with a file generated from `<()`

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Oct 4 09:33:55 PDT 2020


https://bugs.llvm.org/show_bug.cgi?id=47723

            Bug ID: 47723
           Summary: -include doesn't work with a file generated from `<()`
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Driver
          Assignee: unassignedclangbugs at nondot.org
          Reporter: gabravier at gmail.com
                CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
                    richard-llvm at metafoo.co.uk

clang -include <(some_command)

This, with bash, should result in a GCC-like compiler including whatever text
`some_command` generates before any of the source file is processed. In GCC,
this works, but not in Clang. For example this code :

void g()
{
    goto lbl;
lbl:;
}

Will compile, even if `-include <(echo '#pragma GCC poison goto')` is given as
an option, whereas it will not compile on GCC. (Note: The pragma would work,
it's just that Clang doesn't seem to include the file generated by <()
properly).

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20201004/7e1ea9b5/attachment.html>


More information about the llvm-bugs mailing list