-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInit.cpp
More file actions
55 lines (43 loc) · 977 Bytes
/
Init.cpp
File metadata and controls
55 lines (43 loc) · 977 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/**
* \file Init.cpp
* \brief
*/
#include <StdStream/StdStream.h>
#include <StdTest/StdTest.h>
#include <Stl.h>
//-------------------------------------------------------------------------------------------------
struct Point
{
signed char x;
unsigned int y;
void print() const
{
std::cout << STD_TRACE_VAR2(x, y) << std::endl;
}
};
//-------------------------------------------------------------------------------------------------
int main(int, char **)
{
{
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
Point p;
p.print();
#pragma GCC diagnostic pop
}
{
Point p {};
p.print();
}
{
Point p = {126, 40};
p.print();
}
return EXIT_SUCCESS;
}
//-------------------------------------------------------------------------------------------------
#if OUTPUT
x: <UB>, y: <UB>
x: <NUL>; y: 0
x: ~; y: 40
#endif