From patchwork Mon Jun 6 02:17:48 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Korb X-Patchwork-Id: 98789 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 2F061B6FB5 for ; Mon, 6 Jun 2011 12:18:09 +1000 (EST) Received: (qmail 14032 invoked by alias); 6 Jun 2011 02:18:07 -0000 Received: (qmail 14024 invoked by uid 22791); 6 Jun 2011 02:18:06 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RFC_ABUSE_POST X-Spam-Check-By: sourceware.org Received: from mail-pz0-f47.google.com (HELO mail-pz0-f47.google.com) (209.85.210.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 06 Jun 2011 02:17:51 +0000 Received: by pzk36 with SMTP id 36so1699143pzk.20 for ; Sun, 05 Jun 2011 19:17:50 -0700 (PDT) Received: by 10.68.50.161 with SMTP id d1mr1607151pbo.439.1307326670731; Sun, 05 Jun 2011 19:17:50 -0700 (PDT) Received: from [10.0.0.2] (adsl-75-2-131-205.dsl.pltn13.sbcglobal.net [75.2.131.205]) by mx.google.com with ESMTPS id n1sm3322042pbi.31.2011.06.05.19.17.49 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 05 Jun 2011 19:17:50 -0700 (PDT) Message-ID: <4DEC38CC.1080006@gmail.com> Date: Sun, 05 Jun 2011 19:17:48 -0700 From: Bruce Korb User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110414 SUSE/3.1.10 Thunderbird/3.1.10 MIME-Version: 1.0 To: GCC Patches Subject: Patch: aesthetics for gcc/cp/cxx-pretty-print.c X-IsSubscribed: yes 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 It also caused a code analysis tool to wander off into the weeds. 2011-06-05 Bruce Korb * gcc/cp/cxx-pretty-print.c (pp_cxx_decl_specifier_seq): Do not have a switch label pointing into an "else" clause for an "if". Index: gcc/cp/cxx-pretty-print.c =================================================================== --- gcc/cp/cxx-pretty-print.c (revision 174678) +++ gcc/cp/cxx-pretty-print.c (working copy) @@ -1199,13 +1199,16 @@ case FUNCTION_DECL: /* Constructors don't have return types. And conversion functions - do not have a type-specifier in their return types. */ + do not have a type-specifier in their return types. */ + if (DECL_CONSTRUCTOR_P (t) || DECL_CONV_FN_P (t)) - pp_cxx_function_specifier (pp, t); - else if (DECL_NONSTATIC_MEMBER_FUNCTION_P (t)) - pp_cxx_decl_specifier_seq (pp, TREE_TYPE (TREE_TYPE (t))); - else - default: + pp_cxx_function_specifier (pp, t), break; + + if (DECL_NONSTATIC_MEMBER_FUNCTION_P (t)) + pp_cxx_decl_specifier_seq (pp, TREE_TYPE (TREE_TYPE (t))), break; + /* FALLTHROUGH */ + + default: pp_c_declaration_specifiers (pp_c_base (pp), t); break; }