From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 47653 invoked by alias); 3 Jan 2019 17:03:27 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 47640 invoked by uid 89); 3 Jan 2019 17:03:26 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=sure!, sense X-HELO: mail-it1-f170.google.com Received: from mail-it1-f170.google.com (HELO mail-it1-f170.google.com) (209.85.166.170) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 03 Jan 2019 17:03:25 +0000 Received: by mail-it1-f170.google.com with SMTP id b5so43514561iti.2 for ; Thu, 03 Jan 2019 09:03:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to :content-transfer-encoding; bh=OIqI4301+FfpKMFsg+rWqzbg/mtGld14uLTiFFrct7U=; b=MGigSLL5h7tOn5VpdotrR6rD3vdMD/qJ3oMn7ebMT2wLqgvsFSth6DHqcKr2iohajs QEYC8KGd1dgQMUTMe9K+1Gl/crk+5BmP141tMCB8Rqt2aXP7sFbshWv4ACsw37hRTACD tGYrriyUDoToqu36BBQDjaRlrWfjBMAqmdQGuAv9PEtyVbE5FmRA++A3bt8jX+bVTqSl NAbLv03nMFoACISvv/w9Q7HZeG4XlcQLNAn8BlTdi5xxZlAiL0QeBRDqPc7ZlEgc2fr+ 1h8sz++9ykP2NP0Fh1rS1++kgVhWKWv8wkXwPVvqQppqruXfbAEeiURh61OruXGnba4Y 5gig== MIME-Version: 1.0 From: =?UTF-8?Q?Daniel_Marjam=C3=A4ki?= Date: Thu, 03 Jan 2019 17:03:00 -0000 Message-ID: Subject: Re: syntax errors To: David Malcolm , gcc@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-SW-Source: 2019-01/txt/msg00004.txt.bz2 Thank you for the quick reply. > how about "stray %qs token"? I will change. > I wonder how much we want to special-case this. Are you thinking about > the case where there's a stray symbol in the code (perhaps due to a > stray keypress, or unfinished manual edits)? At the moment I only think about ) } ] I would like to focus on only those 3 to start with. but it sounds good to prepare for more stray tokens later. > if (c_parser_next_token_is_meaningless_p (parser)) > complain_about_stray_token (parser); > else > ... sure! > It might make sense to emit a fix-it hint suggesting the removal of the > stray token. It is 50% chance that the closing paranthesis should be removed. Maybe there is a missing "(". Maybe the error message should indicate that.. something like "either there is missing "(" or this ")" is a stray token". Best regards, Daniel Marjam=C3=A4ki