Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

C++ compiler pretends to support C++11 but does not have <cuchar> #43841

Open Quuxplusone opened 4 years ago

Quuxplusone commented 4 years ago
Bugzilla Link PR44871
Status CONFIRMED
Importance P enhancement
Reported by Bruno Haible (bruno@clisp.org)
Reported on 2020-02-11 05:52:17 -0800
Last modified on 2021-03-03 09:55:09 -0800
Version 6.0
Hardware PC FreeBSD
CC ldionne@apple.com, llvm-bugs@lists.llvm.org, mclow.lists@gmail.com
Fixed by commit(s)
Attachments foo.cc (51 bytes, text/x-c++src)
Blocks
Blocked by
See also
Created attachment 23120
test case

Originally reported at https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=244035.
The FreeBSD people told me to report it here.

C++11 added the header file <cuchar> (a wrapper around the C header file
<uchar.h>). See https://en.cppreference.com/w/cpp/header

$ cat foo.cc
#if __cplusplus >= 201103
#include <cuchar>
#endif

$ c++ -c foo.cc
foo.cc:2:10: fatal error: 'cuchar' file not found
#include <cuchar>
         ^~~~~~~~
1 error generated.

$ c++ --version
FreeBSD clang version 6.0.1 (tags/RELEASE_601/final 335540) (based on LLVM
6.0.1)
Target: x86_64-unknown-freebsd12.0
Thread model: posix
InstalledDir: /usr/bin
Quuxplusone commented 4 years ago

Attached foo.cc (51 bytes, text/x-c++src): test case

Quuxplusone commented 3 years ago

Up for review: https://reviews.llvm.org/D97870