From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 38902 invoked by alias); 12 Jul 2018 20:03:02 -0000 Mailing-List: contact fortran-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: fortran-owner@gcc.gnu.org Received: (qmail 38817 invoked by uid 89); 12 Jul 2018 20:03:02 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=3.7 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPAM_BODY,SPF_PASS autolearn=no version=3.3.2 spammy=H*i:sk:ac44eee, H*f:sk:ac44eee, H*r:sk:c10-v6s, HTo:U*tkoenig X-HELO: mail-yb0-f181.google.com Received: from mail-yb0-f181.google.com (HELO mail-yb0-f181.google.com) (209.85.213.181) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 12 Jul 2018 20:03:00 +0000 Received: by mail-yb0-f181.google.com with SMTP id c10-v6so10138401ybf.9; Thu, 12 Jul 2018 13:03:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=//gCj5qOwcT1lnuRc2ElgLFIDAOQmvzuIlKjiFgNPWo=; b=rSJp5+OlZS3PusBEHTa80H2MFu9I3PTb4Xz6w9SyKjbDVI44ggeGcoN1DWvDbLeGth PIQXtqwMnKXwfIkS5n5wAFEtr2SFIMncnIdUmmBPIAHCJVFrv8UpdkSTa0ze/h19aBpk g0CBVSFRhLpOATLC7NjwojJm4PBSLkgENaQmvhJQrAWrQfpYQjj+olUTa00N/UFJmAuT aueTRs1zTEXN/Q7HcA5VTaxiNyH3nloDf9+Yvv4Sb6wox6wdIiu2XGHUhvY96GNOV7AJ n4GtzY5bdtQ/J1qiA4u84v9Y3m3ADsdad0AcA9acgy8UUpvaYWwYbXZxi274cJMbIifo YxOw== MIME-Version: 1.0 Sender: jaydub66@gmail.com Received: by 2002:a81:9a13:0:0:0:0:0 with HTTP; Thu, 12 Jul 2018 13:02:58 -0700 (PDT) In-Reply-To: References: <3D4B88C8-39B3-4E6C-9FA0-4EB6F80788B5@lps.ens.fr> From: Janus Weil Date: Thu, 12 Jul 2018 20:03:00 -0000 Message-ID: Subject: Re: [Patch, Fortran] PR 85599: warn about short-circuiting of logical expressions for non-pure functions To: Thomas Koenig Cc: =?UTF-8?Q?Dominique_d=27Humi=C3=A8res?= , gfortran , gcc-patches Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2018-07/txt/msg00025.txt.bz2 2018-07-12 21:53 GMT+02:00 Thomas Koenig : > 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