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

Janus Weil janus@gcc.gnu.org
Tue Jul 17 05:08:00 GMT 2018


2018-07-16 21:50 GMT+02:00 Thomas Koenig <tkoenig@netcologne.de>:
> Am 16.07.2018 um 10:06 schrieb Janus Weil:
>>>
>>> However, one point: I think that the warning should be under a separate
>>> warning, which should then be enabled by -Wextra.
>>> -Waggressive-function-elimination, could be reused for this,
>>> or something else
>>
>> I don't actually see such a flag in the manual.
>
> Ah, sorry, I misremembered the option, it is actually
> -Wfunction-elimination.
>
> What I would suggest is to enable -Wfunction-eliminiation with
> -Wextra and also use that for your new warning.

Thanks for the comments. Makes sense. Updated patch attached.

I'll wait two more days to allow for further comments and will commit
this to trunk on Thursday if I hear no further complaints.

Cheers,
Janus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr85599_v5.diff
Type: text/x-patch
Size: 5560 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20180717/9a06bd78/attachment.bin>


More information about the Fortran mailing list