From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.bugs Subject: bug#7918: [PATCH] cc-mode: only the first clause of a for-loop should be checked for declarations Date: Tue, 25 Jan 2011 22:36:22 -0800 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=0016e6509d4a2a4cf8049aba0d4f X-Trace: dough.gmane.org 1296024942 10949 80.91.229.12 (26 Jan 2011 06:55:42 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 26 Jan 2011 06:55:42 +0000 (UTC) To: 7918@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jan 26 07:55:38 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PhzI1-0006IX-Gx for geb-bug-gnu-emacs@m.gmane.org; Wed, 26 Jan 2011 07:55:37 +0100 Original-Received: from localhost ([127.0.0.1]:39823 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PhzI0-0008GY-Ui for geb-bug-gnu-emacs@m.gmane.org; Wed, 26 Jan 2011 01:55:37 -0500 Original-Received: from [140.186.70.92] (port=39118 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PhzHZ-00089J-E2 for bug-gnu-emacs@gnu.org; Wed, 26 Jan 2011 01:55:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PhzHX-0007Mg-L1 for bug-gnu-emacs@gnu.org; Wed, 26 Jan 2011 01:55:09 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:50515) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PhzHX-0007Mc-JQ for bug-gnu-emacs@gnu.org; Wed, 26 Jan 2011 01:55:07 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1PhysI-0003b4-Ho; Wed, 26 Jan 2011 01:29:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Daniel Colascione Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 26 Jan 2011 06:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 7918 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.129602330413777 (code B ref -1); Wed, 26 Jan 2011 06:29:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 26 Jan 2011 06:28:24 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Phyrf-0003aA-2x for submit@debbugs.gnu.org; Wed, 26 Jan 2011 01:28:23 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Phyrd-0003Zz-DH for submit@debbugs.gnu.org; Wed, 26 Jan 2011 01:28:22 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PhyzT-00021L-1b for submit@debbugs.gnu.org; Wed, 26 Jan 2011 01:36:28 -0500 Original-Received: from lists.gnu.org ([199.232.76.165]:35370) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PhyzS-00021H-V5 for submit@debbugs.gnu.org; Wed, 26 Jan 2011 01:36:27 -0500 Original-Received: from [140.186.70.92] (port=50751 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PhyzR-0002Nt-Pa for bug-gnu-emacs@gnu.org; Wed, 26 Jan 2011 01:36:26 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PhyzP-00020t-BH for bug-gnu-emacs@gnu.org; Wed, 26 Jan 2011 01:36:25 -0500 Original-Received: from mail-qy0-f176.google.com ([209.85.216.176]:51065) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PhyzP-00020f-4T for bug-gnu-emacs@gnu.org; Wed, 26 Jan 2011 01:36:23 -0500 Original-Received: by qyk10 with SMTP id 10so642777qyk.0 for ; Tue, 25 Jan 2011 22:36:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type; bh=eXRRKej50vcY91YF8SZxXFXsjTmC58i3W41HltEWmVQ=; b=XNsGYmU82hpQojKaC00DnO8hDnEflYc5uCNSEo5S8Mfxhn3UWkHtQHh8rk8H+WQk8u ysbzPeyw+doeuPYacl9TVgXyxlVKtPO1HQyTWUQ24waac3y/aMewmwvsYsq1TA2jOuzA B2lCPpLqZIyAv/sgYanjfRip0sggiPtcmtfPU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=GWcNhBT5biJP+r95HAVHyEns8ulQOh1CFipoDivuSWb3tl4yoAoKSfh9YUiJaRtNVx PJlGL2u7qZKXwFC6dvxmh2oal3R/epcvqmYziP+WrBUbAY+Aw+2o10JKsP5jiHH4lKeK 4aAUU6UNAOx5J72u/U9uNj1+vXSaV4v9kaSDI= Original-Received: by 10.229.211.206 with SMTP id gp14mr45657qcb.289.1296023782312; Tue, 25 Jan 2011 22:36:22 -0800 (PST) Original-Received: by 10.220.200.11 with HTTP; Tue, 25 Jan 2011 22:36:22 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Wed, 26 Jan 2011 01:29:02 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:43652 Archived-At: --0016e6509d4a2a4cf8049aba0d4f Content-Type: text/plain; charset=ISO-8859-1 // This code has no variable declarations void foo() { for (; (DWORD) a * b ;) ; for (; a * b ;) ; } --0016e6509d4a2a4cf8049aba0d4f Content-Type: text/plain; charset=US-ASCII; name="fix-for.patch" Content-Disposition: attachment; filename="fix-for.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gjdv1y0t0 PT09IG1vZGlmaWVkIGZpbGUgJ2xpc3AvcHJvZ21vZGVzL2NjLWZvbnRzLmVsJwotLS0gbGlzcC9w cm9nbW9kZXMvY2MtZm9udHMuZWwJMjAxMC0xMi0wNyAxMjoxNToyOCArMDAwMAorKysgbGlzcC9w cm9nbW9kZXMvY2MtZm9udHMuZWwJMjAxMS0wMS0yNSAxMToxMDowMCArMDAwMApAQCAtMTA4MCw3 ICsxMDgwLDggQEAKIAkgIDs7IG8gLSAnPD4gaWYgdGhlIGFyZ2xpc3QgaXMgb2YgYW5nbGUgYnJh Y2tldCB0eXBlOwogCSAgOzsgbyAtICdhcmdsaXN0IGlmIGl0J3Mgc29tZSBvdGhlciBhcmdsaXN0 OwogCSAgOzsgbyAtIG5pbCwgaWYgbm90IGluIGFuIGFyZ2xpc3QgYXQgYWxsLiAgVGhpcyBpbmNs dWRlcyB0aGUKLQkgIDs7ICAgcGFyZW50aGVzaXNlZCBjb25kaXRpb24gd2hpY2ggZ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