This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Fold VIEW_CONVERT_EXPR <type, STRING_CST> generated by Fortran FE a lot (PR target/35366)
Jakub Jelinek wrote, at 11/11/2008 9:49 AM:
> How is LOGICAL supposed to behave if it is storage associated with an
> integer? Defined only if the integer stored has been 0 or 1, or 0 .false.
> and non-zero .true., or something else?
Either one of those makes sense to me. Like all type-punning (other
than transfer round-trips in cases where they're legal), it's
implementation defined, and either one of those is as good a definition
(Personally, I'm in favor of the 0->false, 1->true, other->undefined
version, on grounds that it's the least necessary specification and thus
easiest to maintain compatibility with in the future.)