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 98F693858D37 for ; Thu, 30 Nov 2023 17:37:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 98F693858D37 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 98F693858D37 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=1701365848; cv=none; b=WlmhZutVcOGBvqX/pnOAz6IJ1DwwBR80inCFK0PZpQBuHdjbGX4uYlq/Dd4I56lIq5DjqCraga7k0naFODZoWFMLO8QOSMHKpXbP4EKwvbSAXN03KaeOq5506md2UtZxQwEs7f98cnWHTtuoWTgUxe3EaEOVyLNEj4YvcJTsTFE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701365848; c=relaxed/simple; bh=IjMfhzRzTmHHgSw+XfWA/QwveyYaBARI5wjBsMZa/98=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=uqcgFBRGCwoQgmvFV7GST64iYbVzZOkKfsJPW0FC/X7Mnxa5M3H1+fGQnfbQLtjOln/IvzZvG0hxlqRL8x4vJFmdujGI2C5jt/7ggTGdtGSoZHQcAgsSDSbLOykwVA8yucU6EFbxn2NDloWTP+ZJY+2pKk5EI+TtM5lPuNK/6Bk= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701365845; 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=wF7PC6vc4CAqoWhaKUaWcMQ1mwNeDYdcZ2bUOVAFDVY=; b=c5WLu3StDyol0lwGW3igZSKA+8t4WteZXl1MGywNDuCWDJaQn0wA8IO7YlPwwt0dK2EaBM 40xoor6QJN5Kc8g7JTskVUaThaZL+UL4q+hnIXWx3iI8ua8daBMDq9K+dNpZVjb3k1HIVN zUVmuBzNgy8ZWarClOsiPvhVoP6GboE= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-160-tm_eZzzRPSenwhS-0_fFoQ-1; Thu, 30 Nov 2023 12:37:23 -0500 X-MC-Unique: tm_eZzzRPSenwhS-0_fFoQ-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A684C29ABA0D for ; Thu, 30 Nov 2023 17:37:23 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.2.16.45]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2E017C15881; Thu, 30 Nov 2023 17:37:22 +0000 (UTC) From: Florian Weimer To: Marek Polacek Cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH v3 04/11] Add tests for validating future C permerrors References: <39c669e5eb8d904ce59ad18f3cd0368959ec067b.1700473918.git.fweimer@redhat.com> Date: Thu, 30 Nov 2023 18:37:21 +0100 In-Reply-To: (Marek Polacek's message of "Thu, 30 Nov 2023 12:31:12 -0500") Message-ID: <87fs0nta5q.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.9 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,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: * 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 incompa= tible 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 =E2=80=A6 let's wait? >> --- /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. Thanks, Florian