C++ Logo


Advanced search

Re: [wg14/wg21 liaison] Designated initializers in C++ and C

From: Jens Gustedt <jens.gustedt_at_[hidden]>
Date: Thu, 13 Aug 2020 09:25:47 +0200

on Wed, 12 Aug 2020 22:08:11 +0200 you (Bjarne Stroustrup
<bjarne_at_[hidden]>) wrote:

> On 8/12/2020 9:37 PM, Jens Gustedt via Liaison wrote:
> > IIRC, in C, initializer expressions within the same initializer are
> > unsequenced. So the above code would not have defined behavior in
> > C.
> Some of us are not too happy with easy-to-write-by-accident undefined
> behavior that is not reliably detected by all compilers.

Neither am I, and I hope you are not suggesting that "most of us"
would be happy with that or maybe neutral to it.

I was just trying to collect the facts, and trying to pull them together
to understand why we are where we are.

> > Hm, that looks as if WG21 implemented a completely different feature
> > than WG14:(
> And W14 implemented differing definitions of inline, complex, and
> const, after years of use in C++. Compatibility is seriously hard
> and there is a lot of history to this. Please remember that some of
> us have tried to keep up with the C standards effort since before the
> 1989 standard. With two different standards and two different groups
> of people maintaining them, we will continue to get a number of
> deliberate and accidental incompatibilities. I have dreamed of a
> merger of C and C++ since the late 1980s, and I am not alone, but
> there are enough people (on both sides) insisting on
> incompatibilities that I am not optimistic about that.

yes, exactly

That is why this mailing list and discussions like the one this
emerged from are a first step to increase the mutual knowledge about
technicalities and also about motivations in the different

My remark above was not meant to put blame on anybody. It was to
insist that when one of the committees includes a feature from the
other language, they'd better consult that other language (and now
this list here). This will help us to see if the inclusion covers most
intended aspects, and doesn't create new incompatibilities.


:: INRIA Nancy Grand Est ::: Camus ::::::: ICube/ICPS :::
:: ::::::::::::::: office Strasbourg : +33 368854536   ::
:: :::::::::::::::::::::: gsm France : +33 651400183   ::
:: ::::::::::::::: gsm international : +49 15737185122 ::
:: http://icube-icps.unistra.fr/index.php/Jens_Gustedt ::

Received on 2020-08-13 02:29:14