C++ Logo


Advanced search

Re: [ub] Undefined behaviour from uninitialised variables

From: Tony Van Eerd <tvaneerd_at_[hidden]>
Date: Thu, 31 Oct 2013 18:19:30 +0000
> 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).
> Thanks,
> - Daniel

My guess:

int i; // ??? intentional ???

int j [[uninitialized]]; // (no idea where the attribute goes)

int k = 3;

Compilers could aggressively warn about 'i' without warning about 'j';


This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.

Received on 2013-10-31 19:19:48