Search code examples
If I decrement `std::size_t(0)` is that guaranteed to be equal to `std::size_t(-1)`?...


c++undefined-behaviorinteger-overflowunsigned-integer

Read More
Does offsetof require pointer derefence?...


c++cmacrosundefined-behavioroffsetof

Read More
is casting char pointer to int pointer a undefined behavior?...


cundefined-behavior

Read More
Is transmuting bytes to a float safe or might it produce undefined behavior?...


floating-pointrustundefined-behavior

Read More
Different results for idiv instruction...


cundefined-behaviormingw-w64integer-division

Read More
Operation on ... may be undefined?...


cundefined-behavior

Read More
Is std::memcpy between different trivially copyable types undefined behavior?...


c++language-lawyerc++17undefined-behaviorstrict-aliasing

Read More
Is it defined behavior to reference an early member from a later member expression during aggregate ...


c++c++11language-lawyerc++14undefined-behavior

Read More
Convert built-in data type to std::string: memcpy vs snprintf...


c++stringundefined-behaviormemcpy

Read More
Why does shifting a variable by more than its width in bits zeroes out?...


cundefined-behaviorbit-shift

Read More
Is it undefined behavior to call printf with %s and pass a zero-length char*?...


c++printflanguage-lawyerundefined-behavior

Read More
Is `y = x = x + 1;` undefined behavior?...


cundefined-behavior

Read More
Variadic macros: Different output for identical code...


cgccundefined-behaviorpreprocessor

Read More
Is the 16-bit math in this program invoking undefined behavior?...


c++language-lawyerundefined-behaviormsvc14

Read More
Does casting an array to a char* imply a limit on the string's length?...


cundefined-behavior

Read More
Correctness of misaligned access in C++...


c++memoryundefined-behaviormemory-alignment

Read More
sem_post, signal handlers, and undefined behavior...


csignalsposixsemaphoreundefined-behavior

Read More
Why does the enhanced GCC 6 optimizer break practical C++ code?...


c++gcccompiler-optimizationundefined-behavior

Read More
C++ code is giving a run-time error in the condition of for loop Whereas it is compiling correctly i...


c++for-loopundefined-behaviorunsigned-integermodular-arithmetic

Read More
Strange GCC6 optimization with builtin function...


cgccundefined-behaviorgcc4gcc6

Read More
Passing non-lvalue as const reference argument. Is the temp created in local scope or caller scope?...


c++referenceundefined-behavior

Read More
Why deleting void* is UB rather than compilation error?...


c++language-lawyerundefined-behaviordelete-operatorvoid-pointers

Read More
Not able to find the reason for undefined behavior...


c++global-variablesundefined-behavior

Read More
C - Why is my array being overwritten?...


carraysstringundefined-behavioroverwrite

Read More
for loop resulting in undefined behaviour c...


cpointersfor-loopundefined-behavior

Read More
Why is writing to a non-const object after casting away const of pointer to that object not UB?...


c++constantsundefined-behaviorconst-correctnessconst-cast

Read More
Usage of string::c_str() and data() under pre-C++11 standards...


c++memoryundefined-behavior

Read More
How do we explain the result of the expression (++x)+(++x)+(++x)?...


c++undefined-behavioroperator-precedence

Read More
Is initializing a pointer declarator with an invalid pointer undefined behavior?...


c++language-lawyerundefined-behaviorinvalid-pointer

Read More
Is there any compiler flag that I could use in the code below to report a warning about UB?...


c++gcclanguage-lawyercompiler-optimizationundefined-behavior

Read More
BackNext