From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 609443858C50 for ; Wed, 30 Mar 2022 02:24:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 609443858C50 Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-227-AHHYq7gUM4-4P0_Cz1QjnA-1; Tue, 29 Mar 2022 22:23:58 -0400 X-MC-Unique: AHHYq7gUM4-4P0_Cz1QjnA-1 Received: by mail-qt1-f199.google.com with SMTP id l19-20020a05622a175300b002e1a85b5b52so16272338qtk.21 for ; Tue, 29 Mar 2022 19:23:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=N+/Ndzl4d4azfQ2+ZiqgSi414aG5J4C+u+sxo5nynCg=; b=CLasR89mngAyptPn2G6kDbhoG55+x0ELO05yLD+jzJ4J5CWshY2iLJe2kZH+rUTOXl wdYUz46c1g/c/PTbKGPMHeafL3MUT15akgHFEIIhQfGJ3cSMfIhzcH8Q8CFboL1DZEsu hkJiTYpYusa1ij2Wf/QUvmI9bjs+MAiIMEWDDxIafRM3JBLIhfMQmkTUwBHNhYQig5i0 iQRj2Bzgjw0eDrUxYftvkA6ZyewvIUehc1Wa9WyccmzlbA+MyXzq9BuGe5M0E++3SD10 kGRdXCkr1kmhRv1wkFJbDScqgEzpyAi/APRhFS5vL/Xs64Mw8356SP0g8gJ5X3ofccjz gHew== X-Gm-Message-State: AOAM532KBeaWAgyST3D7rxKu+h7/0vX7GKL1RyJIQqf6nnVj185TKg0x IKRNLMu9kAwZ8gzqpqVja2aMIDTw4/qM9l4KxsHfdT9kRlMx0MHMS0fvaZPaqVsI+b5DDH1A0IZ yVZAeONToW2xLq0zD9Q== X-Received: by 2002:a05:622a:1745:b0:2e1:c930:e0dc with SMTP id l5-20020a05622a174500b002e1c930e0dcmr31237541qtk.263.1648607037842; Tue, 29 Mar 2022 19:23:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxRlsUvLc5YYuBcDNteqAacWIB6Q7pd+RlB49EPmVJynmTqpMMk0ezIengR85UzCwYdBTSiUw== X-Received: by 2002:a05:622a:1745:b0:2e1:c930:e0dc with SMTP id l5-20020a05622a174500b002e1c930e0dcmr31237533qtk.263.1648607037549; Tue, 29 Mar 2022 19:23:57 -0700 (PDT) Received: from [192.168.1.149] (130-44-159-43.s15913.c3-0.arl-cbr1.sbo-arl.ma.cable.rcncustomer.com. [130.44.159.43]) by smtp.gmail.com with ESMTPSA id x21-20020a376315000000b0067d1b191f89sm10324242qkb.68.2022.03.29.19.23.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 29 Mar 2022 19:23:56 -0700 (PDT) Message-ID: <7d4d71fe-5fa5-feee-1e2e-c1878be7a43e@redhat.com> Date: Tue, 29 Mar 2022 22:23:56 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH] c-family: ICE with -Wconversion and A ?: B [PR101030] To: Marek Polacek , GCC Patches References: <20220329205321.90251-1-polacek@redhat.com> From: Jason Merrill In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Mar 2022 02:24:01 -0000 On 3/29/22 16:59, Marek Polacek wrote: > On Tue, Mar 29, 2022 at 04:53:21PM -0400, Marek Polacek via Gcc-patches wrote: >> This patch fixes a crash in conversion_warning on a null expression. >> It is null because the testcase uses the GNU A ?: B extension. We >> could also use op0 instead of op1 in this case, but it doesn't seem >> to be necessary. > > A related issue: we print > warning: overflow in conversion from 'int' to 'char' changes value from '300' to '','' > in the test in the patch. That's because the value is 44, it's type is char, > and the ASCII value for ',' is 44. So I think we should convert values of char > type to int for the diagnostic. Sure.