C++ Logo

sg16

Advanced search

Re: [SG16] On the character encoding of diagnostic text

From: Jens Maurer <Jens.Maurer_at_[hidden]>
Date: Tue, 1 Sep 2020 21:27:24 +0200
On 01/09/2020 21.19, Corentin Jabot via SG16 wrote:
>
>
> On Tue, Sep 1, 2020, 18:08 Alisdair Meredith via SG16 <sg16_at_[hidden] <mailto:sg16_at_[hidden]>> wrote:
>
> For a cross compiler, the basic execution character set should correspond to the target platform, but the diagnostics character set should be for the host?
>
>
> If we wanted to do things properly,
> * There is no relation between the execution encoding and the encoding used by the compiler in its diagnostic output ( which isn't described by the standard ).
> * Going through the execution encoding might be lossy even when going directly from internal to compiler diagnostic encoding would not be.
> * knowing that, we would have multiple options for static_assert:
> * Make it magic ( it is already magic, no other construct is restricted to a string literal)

Linkage specifications [dcl.link], e.g.

  extern "C"

require a string-literal.

I think we need to make it magic, the same way that _Pragma
deals with its string-literal in a magic way.

Jens



> * Add u8 overloads
>
> The later solution would become necessary if static_assert was modified to also accept constant expression as these have to be consistent with execution encoding.

Received on 2020-09-01 14:30:59