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 AB70E3882072 for ; Thu, 30 Nov 2023 21:36:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AB70E3882072 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org AB70E3882072 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701380189; cv=none; b=VUQxNN1WQTXyxqX6aOaM6zPvSe/+8TNxcoN3dGuCpVuUERKMeVfb7JLBYD8HJ4fAH+M5SoKzc45tkRkZDKqNTyTHz9A441LXlJqUcpbBRuNfZuZouZqYqhcsYkBHms12xh06dcIr/eQhX4cCt31ptgi0wxablE2y8Dk0J2V1Ryc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701380189; c=relaxed/simple; bh=qdHmTBOpVmvnc71g/ncPSb7SkkZPZjx33EEzXgOCG8k=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=KwGclCAXeY+KYWgrY8U31/WjFnrUtfKnvxQbgVUN1t1kE+m7lMNMmQOE1qhKql2nQIShLIYkIvRS+yvYeBklwsUgM16Wy3Ox8m1H3pp6ThJTHOlf/KvN/rQ1ZRHWb0Rms2iVVwuX/RIWWX6+lS7CWndn2O+mTpyzkFmzBX3/Nhs= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701380188; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XLnNriOuXAE5cRxELTDe27JD1jFN5lt/eFbe0a8PqS0=; b=NckUQ6KkfXvDEp4IcTLKpzNjdJVE4YWVQVYRmiwCjoK3yqwZ/5Top01BboT9leWPjY5K1f rUau1MNkcFMEcW1JDEbJ7dVQ7wudzSb64UBDiWj3X+53RnLTU55YKM5+eaYr2d7XPy4so4 LIY20rIsXV8OrtMS1EU2K79h8kOXioM= Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-348-XS4BFnmwM-Wdg5lvo7bXaQ-1; Thu, 30 Nov 2023 16:36:27 -0500 X-MC-Unique: XS4BFnmwM-Wdg5lvo7bXaQ-1 Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-77d5f1b03a0so147209385a.3 for ; Thu, 30 Nov 2023 13:36:27 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701380187; x=1701984987; h=user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=XLnNriOuXAE5cRxELTDe27JD1jFN5lt/eFbe0a8PqS0=; b=i646/mRia/nbsTBO7kmEZii4PlDfS20LYLdWbQGoZ3cBJ9RRJVSjzvBSlyyaT+YK5q zc50p5nzZxLB0TX87Lc0ZQvpxnsIaNZrXyl79IMPNFc5Q8Jns9cmx00lvJLjdYD2gTeD sTnSgYfeAwH0cw4MGpVpGmMmiaWTKWdc0BsoA8/tsuSNiD2igZpLGd9q2Wk9YNbDsIWn vZ8eIvwKPqg3uIPslUdiCmMhLb12YY9+GYQK5VyV73EAG/MVojSHQKhsMwzpTxbGq9qL VrCJnBlFqwFWGLpEqv3nta748pdw0jtaDiQRhgyuMzMEgUcuFCn2Pe8+R1prEm9GjwZ1 p9hg== X-Gm-Message-State: AOJu0YxyJ/UtUxzAO4ph08tTuXQmCw/yLhUJnWM1rOFE3YqmtKsRNk1p 6IXOUPmj7QNnRA1VBPoqDjnq1bPEnPncBZlUG1iQAzYiEz4tmPuUSeobB4LGDkMIbK7gPBdxgfx iqivR+F9Vo9zmPa0EFQ== X-Received: by 2002:a05:620a:6609:b0:77d:6600:2047 with SMTP id qf9-20020a05620a660900b0077d66002047mr25555230qkn.62.1701380186809; Thu, 30 Nov 2023 13:36:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IH7XD16906mlD8uOhlBlkJ26J51LpEOgUXZgmhzQTZIr8zMTpXZLMyG7xmMIH+QOVuIQzjCUw== X-Received: by 2002:a05:620a:6609:b0:77d:6600:2047 with SMTP id qf9-20020a05620a660900b0077d66002047mr25555213qkn.62.1701380186496; Thu, 30 Nov 2023 13:36:26 -0800 (PST) Received: from redhat.com (2603-7000-9500-34a5-0000-0000-0000-1db4.res6.spectrum.com. [2603:7000:9500:34a5::1db4]) by smtp.gmail.com with ESMTPSA id re15-20020a05620a8e0f00b0077d85695db4sm853629qkn.99.2023.11.30.13.36.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 13:36:25 -0800 (PST) Date: Thu, 30 Nov 2023 16:36:23 -0500 From: Marek Polacek To: Jakub Jelinek Cc: Florian Weimer , gcc-patches@gcc.gnu.org, Jason Merrill Subject: Re: [PATCH v3 10/11] c: Turn -Wincompatible-pointer-types into a permerror Message-ID: References: <9e40a64880a14cf27d788ecbaf23365b9a5ac069.1700473918.git.fweimer@redhat.com> <87leafrloc.fsf@oldenburg.str.redhat.com> <87h6l3rkxm.fsf@oldenburg.str.redhat.com> MIME-Version: 1.0 In-Reply-To: User-Agent: Mutt/2.2.9 (2022-11-12) X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,RCVD_IN_SORBS_WEB,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no 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 Thu, Nov 30, 2023 at 10:30:44PM +0100, Jakub Jelinek wrote: > On Thu, Nov 30, 2023 at 10:27:33PM +0100, Florian Weimer wrote: > > * Jakub Jelinek: > > > > > On Thu, Nov 30, 2023 at 04:15:26PM -0500, Marek Polacek wrote: > > >> On Thu, Nov 30, 2023 at 10:11:31PM +0100, Florian Weimer wrote: > > >> > * Marek Polacek: > > >> > > > >> > > On Mon, Nov 20, 2023 at 10:56:36AM +0100, Florian Weimer wrote: > > >> > >> --- a/gcc/doc/invoke.texi > > >> > >> +++ b/gcc/doc/invoke.texi > > >> > >> @@ -6183,6 +6183,7 @@ that have their own flag: > > >> > >> @gccoptlist{ > > >> > >> -Wimplicit-function-declaration @r{(C)} > > >> > >> -Wimplicit-int @r{(C)} > > >> > >> +-Wincompatible-pointer-types @r{(C)} > > >> > >> -Wint-conversion @r{(C)} > > >> > >> -Wnarrowing @r{(C++)} > > >> > >> -Wreturn-mismatch @r{(C)} > > >> > > > > >> > > BTW, should the C ones mention Objective-C as well? > > >> > > > >> > Isn't there Objective-C++ as well? I assumed it applied to both > > >> > dialects. > > >> > > >> I think we usually spell both, if they apply. But you can leave it as it is. > > > > > > Seems we use (C and Objective-C only) (40 times) in preference to (C only) > > > (4 times), (C++ and Objective-C++ only) (61 times) in preference to (6 > > > times), but (C and C++ only) (5 times) and never all 4 languages, even > > > when I think it is very likely some switch would be C only, C++ only or > > > C and C++ only. And (C) is used just for Copyright ;) > > > > So it should say “C and Objective-C only” for the C stuff, > > Yes please. > > and “C++ and > > Objective-C++ only” for -Wnarrowing? > > I'd say so, but let's wait for Jason. FWIW, I just checked the code and I agree. > AFAIK one can use any -std={gnu,c}++{98,11,14,17,20,23,26} and their > aliases with Objective-C++, similarly how Objective-C can use any > -std={gnu,c}{89,99,11,17,23} etc. flags. > > > Jason, does the -Wnarrowing aspect of -fpermissive apply to > > Objective-C++ as well, or is it stuck at C++98? Marek