From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.ispras.ru (mail.ispras.ru [83.149.199.84]) by sourceware.org (Postfix) with ESMTPS id 048A13857010 for ; Tue, 29 Dec 2020 19:19:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 048A13857010 Received: from monopod.intra.ispras.ru (unknown [10.10.3.121]) by mail.ispras.ru (Postfix) with ESMTPS id 4B80140AAD63; Tue, 29 Dec 2020 19:19:26 +0000 (UTC) Date: Tue, 29 Dec 2020 22:19:26 +0300 (MSK) From: Alexander Monakov To: Richard Biener cc: gcc@gcc.gnu.org, Marc Glisse , Richard Sandiford Subject: Re: What is the type of vector signed + vector unsigned? In-Reply-To: Message-ID: References: <50e9877-9b37-a418-f420-aa4b9b1d59fe@stedding.saclay.inria.fr> User-Agent: Alpine 2.20.13 (LNX 116 2015-12-14) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 19:19:37 -0000 On Tue, 29 Dec 2020, Richard Biener via Gcc wrote: > >I think clang follows gcc and uses the type of the first operand. > > The desired behavior is the one that OpenCL specifies. If it is implementation > defined we should document behavior. I agree symmetry is nice but eventually > the current C behavior is what OpenCL specifies. Where does OpenCL specify that? Checking the 1.2 OpenCL standard I see the opposite (the code would fail to compile): 6.2.1 Implicit Conversions [...] Implicit conversions between built-in vector data types are disallowed. Alexander