From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#24022: 24.5; C indentation failure Date: Sun, 29 Sep 2019 07:02:35 +0200 Message-ID: References: <8737n8rs1l.fsf@saturn.csh.rit.edu> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="128059"; mail-complaints-to="usenet@blaine.gmane.org" Cc: robgssp@gmail.com, 24022@debbugs.gnu.org To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Sep 29 07:03:23 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iERMh-000XCa-1V for geb-bug-gnu-emacs@m.gmane.org; Sun, 29 Sep 2019 07:03:23 +0200 Original-Received: from localhost ([::1]:36802 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iERMf-0007lX-7U for geb-bug-gnu-emacs@m.gmane.org; Sun, 29 Sep 2019 01:03:21 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44347) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iERMQ-0007lM-IP for bug-gnu-emacs@gnu.org; Sun, 29 Sep 2019 01:03:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iERMP-0000cw-7Y for bug-gnu-emacs@gnu.org; Sun, 29 Sep 2019 01:03:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43177) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iERMM-0000Lu-Mu; Sun, 29 Sep 2019 01:03:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iERMM-0002a6-I5; Sun, 29 Sep 2019 01:03:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <8737n8rs1l.fsf@saturn.csh.rit.edu> Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Sun, 29 Sep 2019 05:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24022 X-GNU-PR-Package: emacs,cc-mode Original-Received: via spool by 24022-submit@debbugs.gnu.org id=B24022.15697333749907 (code B ref 24022); Sun, 29 Sep 2019 05:03:02 +0000 Original-Received: (at 24022) by debbugs.gnu.org; 29 Sep 2019 05:02:54 +0000 Original-Received: from localhost ([127.0.0.1]:51998 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iERME-0002Zj-5z for submit@debbugs.gnu.org; Sun, 29 Sep 2019 01:02:54 -0400 Original-Received: from mail-pf1-f169.google.com ([209.85.210.169]:45008) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iERMB-0002ZV-Vz for 24022@debbugs.gnu.org; Sun, 29 Sep 2019 01:02:52 -0400 Original-Received: by mail-pf1-f169.google.com with SMTP id q21so3656926pfn.11 for <24022@debbugs.gnu.org>; Sat, 28 Sep 2019 22:02:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=FPrXyrniKH992Ine+UKnpBBw8vkzmjbbAYmBeGVwfC8=; b=mZ50OldqPUfnsTZIT4AuVcZAUyxPT01/Jf4YFTV6TJ9V9hio7xWOio+A7PLPmibAg2 aFTrog+dvklK5tjN5PRfJCgjcJsZio2VrIUvz9EV1Pz1A7PeHHCT2lKWfT26Csq16tFU +o2uQ98brZJnpu69CBKPlGzx06O0Cr9ES2PXH1cbgcGvff949nw20mbUVkOqLvFNDPEr Kp6IodfYMuS/lsqSOHH/UD3LmEsiD6zuNEQi2ryyaHQMfjkOfselN5R1CK1JwndD/0Ur ClWgKzFHuHkLoyef5LShwVCSIw7PrG6EdsvClxBsqpr2bSiuweMJXup6JvOauIHpEHl0 w3ng== X-Gm-Message-State: APjAAAX9E7FZ0onlAQHKenU1+zSurII0R8jHfS4rzww17tevK7POiJzJ wbBkYqm/M5iR+sdG2bFZih/OJ9s2eMvecyzx7CY= X-Google-Smtp-Source: APXvYqwHm9az8u27gPMZleUOhjQQO0atFxDV86lq2Du/pyd11cc4nPFt9Wt4KHpQmxQEMs59061v+wCQtmRUEh/CVuk= X-Received: by 2002:aa7:8009:: with SMTP id j9mr13971972pfi.107.1569733366325; Sat, 28 Sep 2019 22:02:46 -0700 (PDT) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:167598 Archived-At: Alan Mackenzie writes: > Hello, robgssp. > > In article you wrote: > >> c-mode fails to indent correctly when a #if is followed by a >> comment. Example: > >> int main() { >> #if defined(a) // comment >> if (b) { >> body(); >> } >> #endif >> } > >> Clearly this isn't the correct indentation. A clean run under -Q behaves >> the same way. > > Yes. > > Thanks for taking the trouble to report this problem, and thanks even > more for cutting the source down to a small, easy to handle test case. > > There have been extensive changes to CC Mode since the release of Emacs > 24.5, and the problem isn't apparent in more recent versions. Bisecting > the changes in mercurial suggest that this bug was "solved" by a commit on > 2016-05-29. > > I've tried to adapt this commit so that it will apply to the Emacs 24.5 > sources, but the changes are just too many for this to be practicable. > > Would it be OK for me to send you a tarball of the up-to-date CC Mode > sources (~1.34 Mb) so that you could build these on Emacs 24.5 and check > that the error really has been fixed (and not just in the cut down test > case you've sent me)? Hi Alan, It looks like this has been fixed, but you were awaiting some further verification from the reporter. Did you ever get such verification? If not, perhaps we should just close this if you can't reproduce it. I can't reproduce it on current master using the example given above. Best regards, Stefan Kangas