From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9437 invoked by alias); 14 Sep 2014 10:32:28 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 9427 invoked by uid 89); 14 Sep 2014 10:32:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: smtp.ispras.ru Received: from smtp.ispras.ru (HELO smtp.ispras.ru) (83.149.199.79) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 14 Sep 2014 10:32:26 +0000 Received: from [10.10.3.121] (unknown [83.149.199.91]) by smtp.ispras.ru (Postfix) with ESMTP id C512A224A7; Sun, 14 Sep 2014 14:32:22 +0400 (MSK) Date: Sun, 14 Sep 2014 10:32:00 -0000 From: Alexander Monakov To: Yury Gribov cc: Richard Biener , GCC Patches , Laurynas Biveinis , Jeff Law , Segher Boessenkool , Bernhard Reutner-Fischer , Trevor Saunders , Mike Stump Subject: Re: [PATCHv2] Vimrc config with GNU formatting In-Reply-To: <5411C8D9.5030109@samsung.com> Message-ID: References: <540863C1.4000909@samsung.com> <54100735.5040700@samsung.com> <541174FC.6080400@samsung.com> <5411C8D9.5030109@samsung.com> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2014-09/txt/msg01126.txt.bz2 On Thu, 11 Sep 2014, Yury Gribov wrote: > Ok, it tooks some time. Basically we want brace symbol to behave differently > in two contexts: > > 1) not add any additional offset when not following control flow operator: > void > f () > { > int x; > { > } > } Note that GCC commonly uses custom iteration macros, e.g.: FOR_EACH_BB_FN(bb, fn) { do_stuff; } and cinoptions that get the braces-in-switch case wrong should get constructs like the above right. (to get gnu-style autoindent in Vim, I've been using http://www.vim.org/scripts/script.php?script_id=575 and would adjust braces in switch by hand if need arose; the script is probably very close to one of approaches posted in this thread, but I haven't checked) Alexander