From patchwork Thu Jun 20 22:05:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Polacek X-Patchwork-Id: 1119842 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-503406-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="VA41p5pk"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45VG9K64Rcz9s4V for ; Fri, 21 Jun 2019 08:05:51 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:mime-version:content-type; q=dns; s=default; b=h2QoYMWzh9jZ1LQ+u9uXLhnRyX3ppEYRusDcpd0GJ5OaWtzFc5 RTsARX4noQNs76RxcvPhILrdmXOzLF1rkFYCL9O9GSb0YYjZ5aQpLlGL+6BBAR5Y QzoUwpy0/SCMUXMRdK+epHq7H40Ct2awtf16JhOSinavo40wq6zz9IDCg= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:mime-version:content-type; s= default; bh=KnVr4EqQ1N0FNJL6szYQvhWw2ck=; b=VA41p5pkLAbg5R48w/aq +/309oiX31LDacqH+ggpMyNXWqSDtGiQhOyMN0QXh1ftEUuYv+cQ0HFQ0OcTNoRQ n7Od6NooDJvHnz6iUaxl6obmVnOufBMgtACRJMa+Tw+gEblRxv7mmUFw50F4pX8X fm1eonlunkteaASdsSudENA= Received: (qmail 92630 invoked by alias); 20 Jun 2019 22:05:43 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 92622 invoked by uid 89); 20 Jun 2019 22:05:43 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-22.8 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_NUMSUBJECT, SPF_HELO_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 20 Jun 2019 22:05:42 +0000 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 76370223881 for ; Thu, 20 Jun 2019 22:05:41 +0000 (UTC) Received: from redhat.com (ovpn-122-34.rdu2.redhat.com [10.10.122.34]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 02B8360FAB; Thu, 20 Jun 2019 22:05:40 +0000 (UTC) Date: Thu, 20 Jun 2019 18:05:38 -0400 From: Marek Polacek To: GCC Patches Cc: Jason Merrill Subject: C++ PATCH to add test for c++/68265 Message-ID: <20190620220538.GL5989@redhat.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.11.4 (2019-03-13) This funny one got fixed by r258549. Tested x86_64-linux, applying to trunk. 2019-06-20 Marek Polacek PR c++/68265 * g++.dg/parse/error62.C: New test. diff --git gcc/testsuite/g++.dg/parse/error62.C gcc/testsuite/g++.dg/parse/error62.C new file mode 100644 index 00000000000..8dac0ffc0d5 --- /dev/null +++ gcc/testsuite/g++.dg/parse/error62.C @@ -0,0 +1,10 @@ +// PR c++/68265 + +int main() +{ + int (*) {} // { dg-error "expected primary-expression" } + any amount of syntactic nonsense // { dg-error "not declared in this scope" } + on multiple lines, with *punctuation* and ++operators++ even... + will be silently discarded + until the next close brace +}