gcc flags

Shlomi Fish shlomif at shlomifish.org
Thu Feb 9 07:32:15 UTC 2012


On Thu, 9 Feb 2012 09:30:17 +0200
Shlomi Fish <shlomif at shlomifish.org> wrote:

> Hi John,
> 
> On Wed, 8 Feb 2012 18:43:25 -0600
> "John J. Boyer" <john.boyer at abilitiessoft.com> wrote:
> 
> > gcc accepts declarations anywhere in a block. However, when I compile on 
> > Windows I get errors because the Microsoft compilers require 
> > declaratives to proceed any processing statements. Is there a gcc flag 
> > that imposes the same requiremennt?
> > 
> 
> This
> http://stackoverflow.com/questions/288441/variable-declaration-placement-in-c 
> suggests "-pedantic" but I recall there being a more specific gcc flag that
> just warns or errors on it. It was said in regards to the bug of the XML-LibXML
> or XML-LibXSLT CPAN modules, which I maintain and which had a similar problems.
> 

Found it in the HACKING.txt file:

"-Wdeclaration-after-statement -Werror"

Regards,

	Shlomi Fish

> Regards,
> 
> 	Shlomi Fish
> 
> > Thanks,
> > John
> > 
> 
> 
> 



-- 
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
Understand what Open Source is - http://shlom.in/oss-fs

Q2: Busy people are unproductive. We are very productive and so we’re never 
busy.
    — Star Trek, “We, the Living Dead” by Shlomi Fish

Please reply to list if it's a mailing list post - http://shlom.in/reply .




More information about the Blinux-list mailing list