From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) by sourceware.org (Postfix) with ESMTPS id 139683858D37; Thu, 22 Jun 2023 21:15:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 139683858D37 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-510d6b939bfso9909217a12.0; Thu, 22 Jun 2023 14:15:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687468522; x=1690060522; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=C34Vngxfw8H+6JrH6Nlio4WYbyB4I3XnZFoHRhD3ppQ=; b=DKM38SSQ8LBg9ii6cEmNYvXWbdmNKXD8pDtiGOy4ldI+9H5iNpxK+M2+Ce/f1GEVEl T4VBKf3B3AQliGaVBLZ3zSJ5UWLCKnAEz8P1hoH48ZrtqrKSxi56AdmPDGlP8D/KNkts d76DnnqN1EhquSykCygctR+gT5LtqRBeTkRic3rVuSMPbUaFm3bxAnuqMsIFORlJHn4a efEl1HQWg3mOQ+7f5efgT1SFwikhqZin2LPbi8ycaOxvObAPsH+lwSjv0CcyZ05Sgt7M qMUwisTDo85W99wliP2+MIAFF3PoSt9ehJRiHaDPAM8egNHfTgbQgrQNoreb+62hkTqJ TAhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687468522; x=1690060522; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=C34Vngxfw8H+6JrH6Nlio4WYbyB4I3XnZFoHRhD3ppQ=; b=dXZRCB5ITnLJtV9lYFozzRNzIDeGzbTP60fWiuTDKtEIZqPK0K6Q0r+W/MUBg7ZBVp Q07g40wWesQr6P77tXHBcTvApE2R1LxsLY1NqxUDVO3y31DRKIxAvgMutUDnHSC7q56q 3IeQYcsDOzQROkyA5kj8SdTs9qU4Kw2meIRVx4YmFtNFxFjaQlviIfKlNn+gu/teIj9H AXwx1FfCP3hBV6vmLNQg8L8/Xu1OH9jLHywmfL1+E5ZWlsBKdypx4dxrr7Qm9+VIbgyK MK+UXCkPDU/cEOL6sjqjmFICAu7zc6JPeMi/2s+4r6ai9eGjzgZMlE5USZKcrh6HeE69 fJgg== X-Gm-Message-State: AC+VfDyctpzq/OUifYWAyKNmh7/gjHC1FVmpO3gf8myRqbnBxLWpUT1E NTB1pgfBJUvXYMlSnO+XMyk= X-Google-Smtp-Source: ACHHUZ6vcdCWO/aMHCYLj8OX3YT61vxdSp+wpOx6IxBicQSnhY3ozqSD5NSI6+GfVCYczWch11skZw== X-Received: by 2002:aa7:d5c5:0:b0:51b:de3e:1e35 with SMTP id d5-20020aa7d5c5000000b0051bde3e1e35mr3703403eds.22.1687468522138; Thu, 22 Jun 2023 14:15:22 -0700 (PDT) Received: from nbbrfq.loc (80-110-214-113.static.upcbusiness.at. [80.110.214.113]) by smtp.gmail.com with ESMTPSA id m6-20020a056402050600b0051849ba515esm4436551edv.13.2023.06.22.14.15.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Jun 2023 14:15:21 -0700 (PDT) Date: Thu, 22 Jun 2023 23:15:17 +0200 From: Bernhard Reutner-Fischer To: Alexandre Oliva Cc: rep.dot.nop@gmail.com, Alexandre Oliva via Gcc-patches , Joseph Myers , fortran@gcc.gnu.org Subject: Re: [PATCH] Introduce hardbool attribute for C Message-ID: <20230622231517.0879762a@nbbrfq.loc> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Wed, 21 Jun 2023 22:08:55 -0300 Alexandre Oliva wrote: > Thanks for the test. > > Did you mean for me to incorporate it into the patch, or do you mean to > contribute it separately, if the feature happens to be accepted? These were your tests that i quoted but i or my MUA botched to add one level of quotes -- sorry for that. > > On Jun 19, 2023, Bernhard Reutner-Fischer wrote: > > > I don't see explicit tests with _Complex nor __complex__. Would we > > want to check these here, or are they handled thought the "underlying" > > tests above? > > Good question. The notion of using complex types to hold booleans > hadn't even crossed my mind. Maybe it is not real, it just sparkled through somehow. > On the one hand, there doesn't seem to be reason to rule them out, and > that could go for literally any other type. > > On the other, there doesn't seem to be any useful case for them. Can > anyone think of one? We could either not reject other such uses and wait or we could reject them and equally wait for complaints. I would not dare to bet who pops up first, fuzzers or users, though arguments of the latter would probably be interesting.. I don't have an opinion (nor a use-case), really, it was just a thought (i mentioned tinfoil hat, did i ;). > > > I'd welcome a fortran interop note in the docs > > Is there any good place for such interop notes? I'm not sure I'm > best-suited to write them up, since Fortran is not a language I'm > very familiar with, but I suppose I could give it a try. > I'd append to your extend.texi hunk below the para about uninitialized a note to the effect of: Note: Types annotated with this attribute may not be Fortran interoperable. I would not go into too much detail about C_BOOL nor LOGICAL for i reckon anybody sensibilised to either two of that attribute, C and Fortran will draw her conclusions. Didn't really think how easy it would be to handle this on the user side, but i fear the modern iso_c_binding way would need help from the compiler for the lazy. I'd expect a user to be able to trivially translate this in wrappers done the old way though, which is a pity from an educational and modernisation POV. Didn't look closely, so this guesstimate might be all wrong, of course. thanks,