xrpld
Loading...
Searching...
No Matches
nix
docker
test_files
cpp_sources
ubsan.cpp
1
#include <
iostream
>
2
#include <
limits
>
3
4
int
5
main()
6
{
7
int
maxInt =
std::numeric_limits<int>::max
();
8
int
volatile
one = 1;
9
std::cout
<<
"Current max: "
<< maxInt <<
std::endl
;
10
int
overflowed = maxInt + one;
11
std::cout
<<
"Overflowed result: "
<< overflowed <<
std::endl
;
12
return
0;
13
}
std::cout
std::endl
T endl(T... args)
iostream
limits
std::numeric_limits::max
T max(T... args)
Generated by
1.16.1