https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120704
--- Comment #2 from congli <congli at smail dot nju.edu.cn> --- Sorry I didn't follow you. The following two statements seem contradictory to me? > I am 100% sure this is undefined behavior free. ---- UB free. > And with cst not being 0 or 1, this is almost definitely undefined. -- not UB > free.