[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lmi] Fixing build with clang 7 and 64-bit Linux
From: |
Vadim Zeitlin |
Subject: |
Re: [lmi] Fixing build with clang 7 and 64-bit Linux |
Date: |
Tue, 13 Nov 2018 23:17:31 +0100 |
On Mon, 12 Nov 2018 23:24:08 +0100 I wrote:
Me> Weirdly enough, the following program does give the expected error:
Me> ---------------------------------- >8 --------------------------------------
Me> % cat ctype_base_val.cpp
Me> #include <locale>
Me>
Me> int main()
Me> {
Me> constexpr std::ctype_base::mask z = {~std::ctype_base::space};
Me> return z;
Me> }
Me> % g++-8 -Wall -std=c++17 ctype_base_val.cpp
Me> ctype_base_val.cpp: In function ‘int main()’:
Me> ctype_base_val.cpp:5:65: error: narrowing conversion of ‘-8193’ from ‘int’
to ‘std::ctype_base::mask’ {aka ‘short unsigned int’} inside { } [-Wnarrowing]
Me> constexpr std::ctype_base::mask z = {~std::ctype_base::space};
Me> ^
Me> ---------------------------------- >8 --------------------------------------
Me> but somehow it doesn't happen when the same code is inside a template. I
Me> think I should open a gcc bug report about this, unless you see something
Me> that I'm missing here.
Just FYI, this is indeed a gcc bug, which I somehow hadn't found
originally even though I should have had:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78244
Regards,
VZ
- [lmi] Fixing build with clang 7 and 64-bit Linux, Vadim Zeitlin, 2018/11/02
- Re: [lmi] Fixing build with clang 7 and 64-bit Linux, Greg Chicares, 2018/11/11
- Re: [lmi] Fixing build with clang 7 and 64-bit Linux, Vadim Zeitlin, 2018/11/11
- Re: [lmi] Fixing build with clang 7 and 64-bit Linux, Greg Chicares, 2018/11/12
- Re: [lmi] Fixing build with clang 7 and 64-bit Linux, Vadim Zeitlin, 2018/11/12
- Re: [lmi] Fixing build with clang 7 and 64-bit Linux, Greg Chicares, 2018/11/13
- Re: [lmi] Fixing build with clang 7 and 64-bit Linux, Vadim Zeitlin, 2018/11/13
- Re: [lmi] Fixing build with clang 7 and 64-bit Linux, Greg Chicares, 2018/11/13
- Re: [lmi] Fixing build with clang 7 and 64-bit Linux, Vadim Zeitlin, 2018/11/13
- Re: [lmi] Fixing build with clang 7 and 64-bit Linux,
Vadim Zeitlin <=