Re: [cfe-users] Undefined behaviour in a small code snippet
1. Undefined behaviour in a small code snippet > (Łukasz Szczur via cfe-users) > > > -- > > Message: 1 > Date: Tue, 13 Mar 2018 01:14:51 +0100 > From: Łukasz Szczur via cfe-users > To: cfe-users@lists.llvm.org &
[cfe-users] Undefined behaviour in a small code snippet
Hello, The program at the bottom prints 1 2 1 2 Does the code contain undefined behaviour in C++17 (note that the structs have common initial sequence )? Łukasz #include using namespace std; struct A { int first; int second; }; struct B { int first; int seco