[Patch, Fortran] PR 85599: warn about short-circuiting of logical expressions for non-pure functions

Janus Weil janus@gcc.gnu.org
Thu Jul 12 20:03:00 GMT 2018


2018-07-12 21:53 GMT+02:00 Thomas Koenig <tkoenig@netcologne.de>:
> Hi Janus,
>
>> The cleaner approach would certainly be to avoid short-circuiting of
>> impure functions altogether. If we can all agree that this is a good
>> idea,
>
>
> This is a fine example of logical short-circuiting - the condition you
> mention is false, therefore the rest need not be evaluated :-)

Thought so :(

Also: Yay, the discussion reached the first meta level ;)

Since you seem to be capable of giving warnings about
short-circuiting, we only need to teach that trick to gfortran now
...!

Cheers,
Janus



More information about the Fortran mailing list