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 205C13858D37 for ; Thu, 30 Nov 2023 18:25:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 205C13858D37 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 205C13858D37 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=1701368756; cv=none; b=fGdgUczI1yGXzE4L9pZgzkZV4kridSJSngIMGwX77T/upfI+ECyVxmqIh+fx/6BmZFAsYWS/BGRQ+OtSiK8pV8oeoe/hBuHKfSZv8p5GjPXA68gfTA1jtoYTn77DK+2njXTAFKXE5VVS2RVdkNazZ2LGGG8FxYkcwWmB3a3Jz0w= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701368756; c=relaxed/simple; bh=Cz0DGRbCBP4PuUNL36ebg3pB/7Qs7yCGIQ9JF0JRWUE=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=kRcaiQ7zRNDCvkQTCjzzmMrr73GS51cHpd1Z8WHwDA+ylTDCch39j3xPsch7PlBHSWZnCJ25SwIRmwJ1Tbq87JQMOAfAWkZYs/k1HOVInVkVnc0bR4lmEDCok+Mk6Cfo2lYuI3f49Hj3OYgAvGOQERatWRfE0JhgVeYY//Dzz2M= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701368754; h=from:from:reply-to: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=EFORGztc8SAXTBYLMBH28xhsZxyA7j1w9jzZbizskyc=; b=JOQ8bgdUMy0Zvx0Jui+XfE51KvDBidJPwBwDTzaNXiM1zWi26hxpQ5ThyPx9ZxaD78pETe sgC+NKJLW/hAWGXzFq4G6QbfFAkN+xd2s0LerEGNDxcOhJx68MntTw4vs0XHwRJx+evco/ VaBu/xGCQWipxVnmX/YgvFouSARLkaM= 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-463-j7CLtYxMM4G_rgYOFGsPPA-1; Thu, 30 Nov 2023 13:25:53 -0500 X-MC-Unique: j7CLtYxMM4G_rgYOFGsPPA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (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 DC28E38130A7 for ; Thu, 30 Nov 2023 18:25:52 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.195.157]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 998352166B26; Thu, 30 Nov 2023 18:25:52 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 3AUIPofO1910786 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Thu, 30 Nov 2023 19:25:50 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 3AUIPnrN1910785; Thu, 30 Nov 2023 19:25:49 +0100 Date: Thu, 30 Nov 2023 19:25:49 +0100 From: Jakub Jelinek To: Marek Polacek Cc: Florian Weimer , gcc-patches@gcc.gnu.org Subject: Re: [PATCH v3 04/11] Add tests for validating future C permerrors Message-ID: Reply-To: Jakub Jelinek References: <39c669e5eb8d904ce59ad18f3cd0368959ec067b.1700473918.git.fweimer@redhat.com> <87fs0nta5q.fsf@oldenburg.str.redhat.com> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.6 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=-3.7 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,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: On Thu, Nov 30, 2023 at 12:39:22PM -0500, Marek Polacek wrote: > 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. Note, I think \\\s are used in thousands of dg-error/dg-warning etc. in other tests already, I think it isn't a big deal. find testsuite -type f | xargs grep 'dg-\(warning\|error\|message\).*".*\\\\\\' | wc -l 4782 Sure, with using {} instead of "" one can get rid of some of the \s. Jakub