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 B21A03858D37 for ; Thu, 30 Nov 2023 17:39:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B21A03858D37 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 B21A03858D37 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701365967; cv=none; b=F5iPE+J13MIHpk6d477oWmd3OixnfvRmLB3MxDIyMdUZpAbc7z9GaENlhnk+/7a7TQIQ+yMycfbHgtm22t0RNTZHGjICGHHEpwAYW0p7zM8HPplYQWSb7B/baUF4Xg4Ml8Hm00MNZze3Nr1SkbopDTz607j9ioiXZzKrpIu+lfk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701365967; c=relaxed/simple; bh=iywyDxDdqoWsW4//3LnzHCnSYectzymKNGFDJ8Uc/OI=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=a+4w0Jt8NywAp9wM1SwUZZaE3sJzZEPBVD1DMxUGXnZxB+fCD2lCLRA+CXjLA9X1iYYmnZDmCGVCSpT3jcxZJERq/H0bF7uHJhR+zvsFGypl4dJilmtxDvVrlfSWrIuSbvzYywvqAU5wN70hap5YDKQSYY7kkVScbebZE3Vh85I= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701365966; 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=t4+UObzmR42Dfv2ambJvjhMXhY+t9FnEbZXHpqQ5rTo=; b=C7VKQv3ht97oLdisshD7Q+evP9ZbfmXB+bI0FUitQB3kgcCrZRx/X1X6sfGufnaGZo7r9D 2OO44RIdoC8auZjWFWqcQeQdDT/PsGVpF5CDiYZ2LVd3wRVro94rcSGK33Vw+vUOG1Qqxn fYU2m08A9DN/1D9kFdx6PlKZUXYVlo8= 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-589-SD31e8DpPuiyJStye-rRxQ-1; Thu, 30 Nov 2023 12:39:25 -0500 X-MC-Unique: SD31e8DpPuiyJStye-rRxQ-1 Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-77d7178e312so137088185a.0 for ; Thu, 30 Nov 2023 09:39:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701365964; x=1701970764; 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=t4+UObzmR42Dfv2ambJvjhMXhY+t9FnEbZXHpqQ5rTo=; b=TgwycBjWg1KOB6q3cGCUJAgikhk+j43YWZ8g8Q6adElFUIP+pQJVNbx+SiFnhu7Taz Mj6xnActdw5GgrpLCgE2sg4zKzCzdcSq9QBgJ6xzTuAhTViurI3lL4N9LCaIvLDpsln0 tjT7qlWBjY28rDA+Mv8XeZ71PuEKGtkV4uGR9wE2pLDgN3kk++0uD0diXOvKYh+DWR/u RZ5Yh7GAFW9vYp61lIkap4O8dxuiSgB54qCvn3V1sweyLxl8KAY1F9EXVg9Od6XfoJXA PmKpwDPgkryH6xGLsHryq1le7H6a3K3u2DP2ibiZE4ya65mrJy2b/BKXneCKn6qo+EOQ 2UDw== X-Gm-Message-State: AOJu0YwnLQbaI2NXFjOSY1dbrxqJ07D6wE0bDvGauN475doYCUY88Vvr Kh/+74FtPlhwzQ4DcOQTOoAbj1NNrA6FsF7Dg//fdONZws/HtHkI8ULeg16bWkS0vrr+WSBKgfR EeELxTROGN81MAt75GGAjkqdSwQ== X-Received: by 2002:a05:620a:2988:b0:77d:cee7:993c with SMTP id r8-20020a05620a298800b0077dcee7993cmr5989651qkp.45.1701365964291; Thu, 30 Nov 2023 09:39:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IE5zr20EAvkErNFmvEqnhdT1pzndVXTvh+ooTR6XivgvWm6oRNU4fMv7xWYcGwuMnWpzqGOHg== X-Received: by 2002:a05:620a:2988:b0:77d:cee7:993c with SMTP id r8-20020a05620a298800b0077dcee7993cmr5989640qkp.45.1701365964055; Thu, 30 Nov 2023 09:39:24 -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 vv16-20020a05620a563000b0077dc528fd6asm684795qkn.73.2023.11.30.09.39.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 09:39:23 -0800 (PST) Date: Thu, 30 Nov 2023 12:39:22 -0500 From: Marek Polacek To: Florian Weimer Cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH v3 04/11] Add tests for validating future C permerrors Message-ID: References: <39c669e5eb8d904ce59ad18f3cd0368959ec067b.1700473918.git.fweimer@redhat.com> <87fs0nta5q.fsf@oldenburg.str.redhat.com> MIME-Version: 1.0 In-Reply-To: <87fs0nta5q.fsf@oldenburg.str.redhat.com> 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_H4,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 06:37:21PM +0100, Florian Weimer wrote: > * Marek Polacek: > > >> +void > >> +implicit_function_declaration (void) > >> +{ > >> + f1 (); /* { dg-warning "'f1' \\\[-Wimplicit-function-declaration\\\]" } */ > >> +} > >> + > >> +extern implicit_int_1; /* { dg-warning "'implicit_int_1' \\\[-Wimplicit-int\\\]" } */ > > > > Oy, these \ tend to get unwieldy. You could probably just say > > { dg-warning {-Wimplicit-int} } > > I wanted to have some more context for the other files that might get > the explict line number wrong. > > >> + return incompatible_pointer_types; /* { dg-error "returning 'int \\\* \\\(\\\*\\\)\\\(int\\\)' from a function with incompatible return type 'int \\\*' \\\[-Wincompatible-pointer-types\\\]" } */ > > > > And here maybe > > { dg-error {returning 'int \* \(\*\)\(int\)' from a function with incompatible return type 'int \*' \[-Wincompatible-pointer-types\]} } > > could work the same. But you don't have to go and change it; I don't > > want to make more work for you. > > Oh, I'm not too familiar with Tcl. I haven't seen single quotes being > used elsewhere. I prefer not to change it unless there is another > reason to rework all this. So … let's wait? Sure. > >> --- /dev/null > >> +++ b/gcc/testsuite/gcc.dg/permerror-system.c > >> @@ -0,0 +1,9 @@ > >> +/* { dg-options "-isystem ${srcdir}" } */ > >> + > >> +/* Test that permerrors appear in system headers. */ > >> + > >> +/* The dg-* directives in the header file are ignored. No warnings are > >> + expected. */ > >> +#include > > > > Why not just #include "permerror-default.c"? > > I wanted to make sure that the file is found through the -isystem path. Aha, okay then. Marek