Re: gcc flags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 9 Feb 2012 09:30:17 +0200
Shlomi Fish <shlomif@xxxxxxxxxxxxxx> wrote:

> Hi John,
> 
> On Wed, 8 Feb 2012 18:43:25 -0600
> "John J. Boyer" <john.boyer@xxxxxxxxxxxxxxxxx> 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 .

_______________________________________________
Blinux-list mailing list
Blinux-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/blinux-list



[Index of Archives]     [Linux Speakup]     [Fedora]     [Linux Kernel]     [Yosemite News]     [Big List of Linux Books]