Subject: Re: P2362R0 Make obfuscating wide character literals ill-formed
From: Peter Brett (pbrett_at_[hidden])
Date: 2021-04-14 14:02:18
> -----Original Message-----
> From: SG16 <sg16-bounces_at_[hidden]> On Behalf Of Giuseppe D'Angelo
> via SG16
> Sent: 14 April 2021 19:50
> Il 14/04/21 18:04, Peter Brett via SG16 ha scritto:
> > Good suggestions. Iâve expanded and revised the paper to include a
> > discussion of clang & gcc behaviour with -fshort-wchar.
> Pedantically, could it be possible to arrange the table so to know
> what's sizeof(wchar_t) for each entry?
> -fshort-wchar makes a difference only if the default size of wchar_t for
> the target platform wouldn't already be ushort. Otherwise, it doesn't
> make a difference (e.g. GCC/Clang targeting Windows)...?
When running clang -target x86_64-win64-msvc, my experiments suggest that it's necessary to also pass -fshort-char in order to obtain 16-bit wchar_t.
I feel confident that readers will be able to figure it out. However, I'll update the paper in R1 as you suggest.
SG16 list run by firstname.lastname@example.org