X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f X-Recipient: geda-user AT delorie DOT com X-Ironport-SBRS: None X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2H8AQDnWCVW/52AA4BegzaBQ4JcuzMBDYFahh4CgT04FAEBAQEBAQEDgQeELgEBBDpPCxgJExIPBQ08E4gbAxIFv1INhH4BAQgCIYZ3hH6CUIJEgxqBFAWOB4gciyiBbZRWh0ofAQFChCMeNIVnAQEB X-IronPort-AV: E=Sophos;i="5.17,704,1437462000"; d="scan'208";a="2612863" Date: Mon, 19 Oct 2015 13:58:02 -0700 From: Larry Doolittle To: "Britton Kerin (britton DOT kerin AT gmail DOT com) [via geda-user AT delorie DOT com]" Subject: Re: [geda-user] does anyone like -Wdeclaration-after-statement Message-ID: <20151019205802.GA6798@recycle.lbl.gov> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Reply-To: geda-user AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: geda-user AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk Friends - On Mon, Oct 19, 2015 at 12:31:35PM -0800, Britton Kerin (britton DOT kerin AT gmail DOT com) [via geda-user AT delorie DOT com] wrote: > > As for me, I always use -Wall enabled, it really helps write reliable > > code (and frequently brokes compilation of some projects :-). > My too. I also use -Wextra. Neither of those imply > -Wdeclaration-after-statement, > it's that unpopular. I like to use -Werror as well and pcb is pretty close > to clean enough -O2 -Wall -Wextra -Wshadow -pedantic --std=c99 and the --std=c99 part explicitly allows declarations after statements. I don't know what to suggest if a compiler doesn't follow an ISO standard 16 years after it's published. Sometimes I'll also add -Wsign-compare -Wundef -Wredundant-decls -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Winline The amazing thing is that clang folks will accept all of those options, too, so they can no longer be labeled purely gcc-specific. - Larry