Re: [Libmesh-devel] Warning change in GCC 4.3

2008-06-16 Thread John Peterson
On Mon, Jun 16, 2008 at 1:16 PM, Roy Stogner <[EMAIL PROTECTED]> wrote: > > [crazy if test snipped] > > Adding more parenthesis won't help this, but fixing the parentheses > that are already there might. On first glance it looks to me like > this line isn't just uncommented, it's wrong. I'd say

Re: [Libmesh-devel] Warning change in GCC 4.3

2008-06-16 Thread Roy Stogner
On Mon, 16 Jun 2008, Benjamin Kirk wrote: >> If there's anything that's confusing you now, it'll probably be >> confusing me a year from now when I reread the same source after >> having forgotten the process of writing it. You know, you two are only illustrating my point via the underhanded tr

Re: [Libmesh-devel] Warning change in GCC 4.3

2008-06-16 Thread Roy Stogner
On Mon, 16 Jun 2008, John Peterson wrote: > This one isn't too bad b/c there are only && and != but you get the idea. > > mesh_refinement_smoothing.C, line 161 > > if (node0 != childnode0 && node0 != childnode1 > && node1 != childnode0 && node1 != childnode1) >break; > > but the comp

Re: [Libmesh-devel] Warning change in GCC 4.3

2008-06-16 Thread John Peterson
On Mon, Jun 16, 2008 at 10:38 AM, Roy Stogner <[EMAIL PROTECTED]> wrote: > > On Mon, 16 Jun 2008, John Peterson wrote: > >> On the other hand I find, Roy's complex logic statements hard to >> understand because I'm surely not the coder he is :) but I don't >> think the compiler should warn about t

Re: [Libmesh-devel] Warning change in GCC 4.3

2008-06-16 Thread Benjamin Kirk
> Hey! If it's "Beat Up On Roy" day, could we celebrate by pointing to > some specific obfuscated examples? :-) I'm not using GCC4.3 yet, so > I'm not going to try to guess what redundant parentheses would be > necessary to make that compiler happy, but if I've been writing code > that makes hum

Re: [Libmesh-devel] Warning change in GCC 4.3

2008-06-16 Thread Roy Stogner
On Mon, 16 Jun 2008, John Peterson wrote: > On the other hand I find, Roy's complex logic statements hard to > understand because I'm surely not the coder he is :) but I don't > think the compiler should warn about this code either (assuming it's > correct!) I'm sure he put considerable effort

Re: [Libmesh-devel] Warning change in GCC 4.3

2008-06-16 Thread John Peterson
On Mon, Jun 16, 2008 at 10:02 AM, Derek Gaston <[EMAIL PROTECTED]> wrote: > OTOH these things are warnings for a reason... they _do_ degrade the > readability of your code. I would vote for leaving the warnings there and > letting (as Ben put it) "attrition" take care of them. This is definitely

Re: [Libmesh-devel] Warning change in GCC 4.3

2008-06-16 Thread Derek Gaston
OTOH these things are warnings for a reason... they _do_ degrade the readability of your code. I would vote for leaving the warnings there and letting (as Ben put it) "attrition" take care of them. Derek On Jun 16, 2008, at 8:49 AM, John Peterson wrote: > On Mon, Jun 16, 2008 at 9:23 AM, Be

Re: [Libmesh-devel] Warning change in GCC 4.3

2008-06-16 Thread John Peterson
On Mon, Jun 16, 2008 at 9:23 AM, Benjamin Kirk <[EMAIL PROTECTED]> wrote: >> Is the lack of extra curly braces now a warning, and therefore we >> should code accordingly? > > Yeah, in gcc-4.3 it warns that it is ambiguous when 'if' the 'else' > corresponds to. My personal feeling is that for compo

Re: [Libmesh-devel] Warning change in GCC 4.3

2008-06-16 Thread Benjamin Kirk
> Is the lack of extra curly braces now a warning, and therefore we > should code accordingly? Yeah, in gcc-4.3 it warns that it is ambiguous when 'if' the 'else' corresponds to. My personal feeling is that for compound clauses which fit on one screen height it is pretty clear provided you have d