4 ms·
Yes, the first two examples in the article weren't obviously enough undefined for the authors of CIL who wrote the list, apparently.
by pascal_cuoq 5y ago
Yes, the first two examples in the article weren't obviously enough undefined for the authors of CIL who wrote the list, apparently.
- Liquid_Fire 5y agoDoes the first example contain undefined behaviour? (As written it does because x is not initialised, but the text suggests that a value is actually being provided for x) I think the second example may contain UB on a <=32-bit architecture (right shift by a value greater or equal to the number of bits), or at least this is UB in C++. On a 64-bit architecture it would be fine (but the result would not be 0).