https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67433

--- Comment #11 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to xuejuncao from comment #10)
> when bool value read from unpacked stream or file, wen can not ensure it's 1
> or 0;
> so maybe the best solution is compile with "-D_Bool=char" for now :-/

You can always do the read with 'char' and then convert to _Bool.

You can also "fix" your testcase (I think, didn't try) by using

union u {
  bool b : 1;
  char c;
} u;

(in case unions allow bitfield members)

Reply via email to