Subject: Re: reading values as bytes without memcpu, from enum unsigned char?
From: Ville Voutilainen (ville.voutilainen_at_[hidden])
Date: 2020-08-10 14:00:10
On Mon, 10 Aug 2020 at 21:54, Thiago Macieira via Std-Discussion
> On Monday, 10 August 2020 11:05:03 PDT language.lawyer_at_[hidden] wrote:
> > > defined in the standard as (UCHAR_MAX + 2) modulo (UCHAR_MAX + 1), which
> > > equals 1. But it doesn't, on any big-endian machine.
> > This is not a proof of that the result currently is implementation-defined.
> > It is a proof that the Standard is prolly currently defective and doesn't
> > reflect the behavior of most "ordinary" implementations.
> > Implementation-defined behavior must be explicitly marked as such and I'd
> > expect to see it in https://timsong-cpp.github.io/cppwp/n4861/impldefindex
> Ok, then we agree: this behaviour must not be UB. It needs to either be
> implementation-defined or unspecified (but valid). I don't claim to know the
> distinction between these two.
Implementation-defined needs to be documented by the implementation,
does not need to be. Because it's unspecified. :P
STD-DISCUSSION list run by email@example.com
Older Archives on Google Groups