[llvm-bugs] [Bug 39749] New: Headers containing just #error harm __has_include
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Nov 22 00:34:27 PST 2018
https://bugs.llvm.org/show_bug.cgi?id=39749
Bug ID: 39749
Summary: Headers containing just #error harm __has_include
Product: libc++
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: All Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: bmerry at gmail.com
CC: llvm-bugs at lists.llvm.org, mclow.lists at gmail.com
It looks like the latest version of <experimental/optional>
(https://llvm.org/svn/llvm-project/libcxx/trunk/include/experimental/optional)
consists only of a #error to tell the user that it isn't supported anymore.
While a helpful error, it will presumably(*) break any code that uses
__has_include to detect whether this header is supported (as recommended by
N4480).
The same applies to <experimental/string_view>, and I'm guessing others
although I haven't checked.
(*) I haven't yet got my own build of libc++ trunk to verify experimentally, so
if there is some compiler magic to know that __has_include should be 0 for
these special cases then I'm less worried.
--
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/20181122/de9ed4dc/attachment.html>
More information about the llvm-bugs
mailing list