Is this safe? (no undefined behavior expected ever)