C++ Logo


Advanced search

Re: [ub] Undefined behaviour from uninitialised variables

From: Daniel Krügler <daniel.kruegler_at_[hidden]>
Date: Thu, 31 Oct 2013 19:14:51 +0100
2013/10/31 Nevin Liber <nevin_at_[hidden]>:
> On 31 October 2013 04:16, Christopher Jefferson <chris_at_[hidden]>
> wrote:
>> Her suggested fix is to introduce a new notation for constructors
>> which means "I am not initialising this member on purpose". This will
>> allow compilers to then add a warning at a high warning level that a
>> member is missed from a constructor.
> Had I a time machine, this would be my preference (not just missing members,
> but all uninitialized variables). But I agree with Ville that this would
> break backwards compatibility.
> On the other hand, maybe adding an attribute would help?

I would like to understand how you would specify the effects of the
attribute (I'm not asking for *exact* standardese, just to get a
better understanding on what you expect from adding this attribute).


- Daniel

Received on 2013-10-31 19:15:06