Search code examples
Division by zero: Undefined Behavior or Implementation Defined in C and/or C++?...

c++cundefined-behaviordivide-by-zero

Read More
How to safely cast integer in zig...

castingundefined-behaviorzig

Read More
Detecting signed overflow in C/C++...

c++cundefined-behaviorsignedinteger-overflow

Read More
Is it safe and defined behaviour to cast a pointer to another level of indirection?...

cpointersundefined-behaviorc99

Read More
Is casting `the address of a pointer to a struct` to `the address of a struct whos first member is a...

c++undefined-behaviorreinterpret-castpointer-conversion

Read More
Why is it undefined behavior to delete[] an array of derived objects via a base pointer?...

c++undefined-behaviordynamic-arraysdelete-operator

Read More
Why does this std::weak_ptr apparently prevent freeing memory, and how can I detect this bug?...

c++valgrindundefined-behavioraddress-sanitizerweak-ptr

Read More
Why is it undefined behavior to std::launder a multidimensional array?...

c++undefined-behaviorstdlaunder

Read More
Is left shifting a long long considered Undefined Behavior in C?...

clanguage-lawyerundefined-behavior

Read More
std::views::chunk, std::views::transform, inputs ranges, and ill-formedness...

c++undefined-behaviorstd-rangesc++23

Read More
std::construct_at and object lifetime?...

c++language-lawyerc++20undefined-behaviorlifetime

Read More
Weird behavior of class using const. references...

c++referenceundefined-behavior

Read More
When is an erroneous value not valid for the object's type?...

c++language-lawyerundefined-behaviorc++26erroneous-behavior

Read More
Why does the compiler optimize `g` to always return true, even though `i == INT_MAX` avoids undefine...

c++undefined-behavior

Read More
What should happen when printing an uninitialized variable?...

c++initializationundefined-behavior

Read More
c - Why does i = ++i invoke undefined behaviour?...

cincrementundefined-behavioroperator-precedencesequence-points

Read More
When is using an uninitialized variable undefined behavior?...

cundefined-behaviorinitialization

Read More
For Kotlin's ordered collections, does groupBy maintain a stable ordering in the resulting group...

kotlinundefined-behavior

Read More
Examples using reinterpret_cast that do not trigger UB...

c++undefined-behaviorreinterpret-caststrict-aliasing

Read More
What is the correct solution to work with bitmaps in terms of pointer arithmetic and conversion?...

c++pointersundefined-behavior

Read More
88. Merge Sorted Array...

c++arrayssortingmergeundefined-behavior

Read More
Ramifications of C++20 requiring two's complement...

c++undefined-behaviortwos-complementc++20

Read More
If there is [[noreturn]], then why there is no [[always_return]]?...

creturnlanguage-lawyerundefined-behavior

Read More
Is an Incremented Variable Reusable in a tie Call?...

c++incrementundefined-behaviorfunction-callstd-tie

Read More
Why are these constructs using pre and post-increment undefined behavior?...

cincrementundefined-behavioroperator-precedencesequence-points

Read More
Is left and right shifting negative integers defined behavior?...

c++undefined-behaviorbit-shift

Read More
In C++, is it valid to treat scalar members of a struct as if they comprised an array?...

c++pointersstructundefined-behaviorstrict-aliasing

Read More
Is it well defined to cast to an identical layout with const members?...

c++constantslanguage-lawyerundefined-behaviorstrict-aliasing

Read More
Possibility of uninitialized use of b in if (!a) { b = get_b(); } if (a || b) { ... }...

cgccinitializationundefined-behavior

Read More
Undefined behavior causing time travel...

c++undefined-behavior

Read More
BackNext