For the C++ case used here, conflicting accesses by different software threads, at least one non-atomic, with neither ordered before the other by happens-before. Such a data race has undefined behavior. A race condition is broader: the lost update with separate atomic reads and writes depends on their order while avoiding a data race.[ref]
Working Draft, Standard for Programming Language C++ (N4861). pp. 79–80: conflicting actions and undefined behavior
New to topics? Read the docs here!