C++ Logo


Advanced search

Re: [ub] Undefined behaviour from uninitialised variables

From: Nevin Liber <nevin_at_[hidden]>
Date: Thu, 31 Oct 2013 12:20:47 -0500
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?
 Nevin ":-)" Liber  <mailto:nevin_at_[hidden]>  (847) 691-1404

Received on 2013-10-31 18:21:28