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.133.124]) by sourceware.org (Postfix) with ESMTPS id EE65D3858C50 for ; Tue, 29 Mar 2022 20:59:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org EE65D3858C50 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-154-We9dEgOXNWmwpKY0OIHkZQ-1; Tue, 29 Mar 2022 16:59:39 -0400 X-MC-Unique: We9dEgOXNWmwpKY0OIHkZQ-1 Received: by mail-qt1-f199.google.com with SMTP id f7-20020a05622a1a0700b002e06d6279d5so11032619qtb.7 for ; Tue, 29 Mar 2022 13:59:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=wPgFsi6vbF0T6RSRP0KkRIkAQONbQ7Bgy11ZrX3sdzw=; b=kE7UEfwm+lvJehDnmjr4XWQYFSBELrsjCoJmTtmSPwtP7fqai+eT3ipLsgD422BSLZ ZKt15ZKWtOBMB4JRTrmvunNJsajw9ZA8hfihdPukFyLv5J1Ap730UMvABDj9s1bimaIQ eoVVBc2J8l8Knl/3HXPWBrMMuLkdOtPBG19URN+4sEdNgAr6QyRL6fns0/bjwR9iMYJi MQgbJSarUQ9zpH+vU0b+fBRzL3NRavPM0bOVveyXSPqykgVkKtNgsciZ6w6whtJHbKu3 N/F8qJxgGcI6Tz5h8Zymp4Cvym7CK+Kr7v4df+WJjTFNj+LA6GjV38HU48xv2iMH1N7A WQJg== X-Gm-Message-State: AOAM531nD+nPpRGoHu1PZi5Fkh92nRcbm+MkWEe92CLx/DbqxAb5UHRg PipbZCJOvwh/+3mvEBsU1uuwhYDrOHMHgPYzmqqHvP3A+vcueQ2Dp4WtRi5H6aS9qQobKh6mNaY 8wwd0gw1AgPwl56n+pqa8/c3iJ+3X5jFjfNYh8ox6RukXDxZaJcQMo1ulg19zz9eoWED6 X-Received: by 2002:a05:620a:d87:b0:67b:30f5:971f with SMTP id q7-20020a05620a0d8700b0067b30f5971fmr21706128qkl.512.1648587578476; Tue, 29 Mar 2022 13:59:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy7y6jw9XbF3A9UCMbTtkej90U+CyO4RTXSSuJPXHSBe9dESuv4J0rJU8oJ6yVYko7YgyXJbg== X-Received: by 2002:a05:620a:d87:b0:67b:30f5:971f with SMTP id q7-20020a05620a0d8700b0067b30f5971fmr21706116qkl.512.1648587578172; Tue, 29 Mar 2022 13:59:38 -0700 (PDT) Received: from redhat.com ([2601:184:4780:4310::5f2c]) by smtp.gmail.com with ESMTPSA id o28-20020a05620a111c00b0067d3b9ef388sm9739030qkk.98.2022.03.29.13.59.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Mar 2022 13:59:37 -0700 (PDT) Date: Tue, 29 Mar 2022 16:59:35 -0400 From: Marek Polacek To: GCC Patches , Jason Merrill Subject: Re: [PATCH] c-family: ICE with -Wconversion and A ?: B [PR101030] Message-ID: References: <20220329205321.90251-1-polacek@redhat.com> MIME-Version: 1.0 In-Reply-To: <20220329205321.90251-1-polacek@redhat.com> User-Agent: Mutt/2.1.5 (2021-12-30) X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5, 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: Tue, 29 Mar 2022 20:59:42 -0000 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. Marek