There is nothing magic about this option. With it C or C++ is compiled exactly like any other programming language where array bounds checking is implicit.
That means that whenever a new value is computed for a pointer or index that will be used to access an array, the value is compared with the bounds associated with that array.
Such a comparison cannot give false positives or negatives, any address is either within bounds or outside bounds.
This is something that is completely independent of the programming language. Out-of-bounds checking has nothing to do with the syntax or with any explicit features of a programming language. It is just a compilation technique, which can be applied or it can be omitted at the compilation of any programming language, regardless whether the language is C or C++ or Ada or Rust.
The only difference is that in better programming language specifications it is required that any conforming compiler must by default insert bounds checks, while in the C and C++ standards the behavior of the compiler is unspecified and the existing compilers have a bad default behavior, so it is the responsibility of the programmer to use the right compiler options.