[Bug c++/68281] '&&' is checked in reverse and reads an uninitialized value
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Nov 11 00:58:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68281
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
See C++14 8.5 [dcl.init] p12:
If an indeterminate value is produced by an evaluation, the behavior is
undefined except in the following cases:
[... various cases involving unsigned char ...]
so you should add the if (present) check before the assignment that uses the
evaluation of value.
More information about the Gcc-bugs
mailing list