Re: [PATCH] gcc-3.0 warnings

2001-03-26 Thread Tim Wright
On Fri, Mar 23, 2001 at 05:16:26PM -0800, Stephen Satchell wrote: [...] > Really? I have a "cleanup" function that can be called during failure > cases (and success cases -- but you didn't mention that) so that the cost > is very low and I don't have to code ANY labels. > > But then again, I'm

Re: [PATCH] gcc-3.0 warnings

2001-03-24 Thread Tim Waugh
On Sat, Mar 24, 2001 at 01:55:15AM +0100, J . A . Magallon wrote: > > On 03.24 Andrew Morton wrote: > > "J . A . Magallon" wrote: > > > > > > The same is with that ugly out: at the end > > > of the function. Just change all that 'goto out' for a return. > > > > Oh no, no, no. Please, no. > >

Re: [PATCH] gcc-3.0 warnings

2001-03-23 Thread Ion Badulescu
On Fri, 23 Mar 2001 23:59:09 +0100, J . A . Magallon <[EMAIL PROTECTED]> wrote: > > > On 03.23 Linus Torvalds wrote: >> >> I agree. I'd much prefer that syntax also. >> >> Or just remove the "default:" altogether, when it doesn't make any >> difference. >> > > Well, at last some sense. The s

Re: [PATCH] gcc-3.0 warnings

2001-03-23 Thread Stephen Satchell
At 04:31 PM 3/23/01 -0800, you wrote: >This has nothing to do with fastpathing and object code optimization. C >doesn't have exception handling, so you either have to remember to undo >allocations etc. in failure cases all through the code, or you stick your >undo code at the end of the function

Re: [PATCH] gcc-3.0 warnings

2001-03-23 Thread J . A . Magallon
On 03.24 Andrew Morton wrote: > "J . A . Magallon" wrote: > > > > The same is with that ugly out: at the end > > of the function. Just change all that 'goto out' for a return. > > Oh no, no, no. Please, no. > > Multiple return statements are a maintenance nightmare. > Well, I do not want t

Re: [PATCH] gcc-3.0 warnings

2001-03-23 Thread Andrew Morton
"J . A . Magallon" wrote: > > The same is with that ugly out: at the end > of the function. Just change all that 'goto out' for a return. Oh no, no, no. Please, no. Multiple return statements are a maintenance nightmare. Go back and look at the "checker" reports. Think about them. - - To u

Re: [PATCH] gcc-3.0 warnings

2001-03-23 Thread Tim Wright
On Fri, Mar 23, 2001 at 11:59:09PM +0100, J . A . Magallon wrote: > > On 03.23 Linus Torvalds wrote: > > > > I agree. I'd much prefer that syntax also. > > > > Or just remove the "default:" altogether, when it doesn't make any > > difference. > > > > Well, at last some sense. The same is with

Re: [PATCH] gcc-3.0 warnings

2001-03-23 Thread Ingo Oeser
On Fri, Mar 23, 2001 at 01:38:00AM +0100, J . A . Magallon wrote: > Is there a non-written standard for coding that asm's ? > For example: > " adcl 12(%1), %0\n" > "1:adcl 16(%1), %0\n" > " lea 4(%1), %1\n" > > or > > "adcl 12(%1), %0\n\t" ^[1] > "1: adcl 16(%

Re: [PATCH] gcc-3.0 warnings

2001-03-23 Thread J . A . Magallon
On 03.23 Linus Torvalds wrote: > > I agree. I'd much prefer that syntax also. > > Or just remove the "default:" altogether, when it doesn't make any > difference. > Well, at last some sense. The same is with that ugly out: at the end of the function. Just change all that 'goto out' for a retu

Re: [PATCH] gcc-3.0 warnings

2001-03-23 Thread Linus Torvalds
On Fri, 23 Mar 2001, Bill Wendling wrote: > Also sprach Alan Cox: > > } > - default: > } > + default:; > } > } Agree - done > } > This kind of coding makes me want to cry. What's so wrong with: > > default: > break; > > instead? The ';' is hard to notice and I agree. I'd mu

Re: [PATCH] gcc-3.0 warnings

2001-03-23 Thread Bill Wendling
Also sprach Alan Cox: } > - default: } > + default:; } } Agree - done } This kind of coding makes me want to cry. What's so wrong with: default: break; instead? The ';' is hard to notice and, if people don't leave the "default:" at the end, then bad things

Re: [PATCH] gcc-3.0 warnings

2001-03-23 Thread Horst von Brand
"J . A . Magallon" <[EMAIL PROTECTED]> said: > I have been building (and hopefully booting) ac-21 with gcc-3.0 snapshot > dated 20010312. I have cleared the 99% of the warnings that 3.0 issues > when building the kernel. Obviuosly, only in the main kernel part for > i386 and the drivers I use. I s

Re: [PATCH] gcc-3.0 warnings

2001-03-23 Thread Tim Waugh
On Fri, Mar 23, 2001 at 01:38:00AM +0100, J . A . Magallon wrote: > Yes, a null sentence can shut up the compiler. But what is the purpose of > a jump to the end instead of a return ? Some optimization ? So that when someone decides that the function needs to do some extra initialisation at the

Re: [PATCH] gcc-3.0 warnings

2001-03-22 Thread J . A . Magallon
On 03.23 Alan Cox wrote: > > page_cache_release(page); > > -out: > > out:; > Yes, a null sentence can shut up the compiler. But what is the purpose of a jump to the end instead of a return ? Some optimization ? > does that trick > > > - default: > > + default:; > Same, I have not te

Re: [PATCH] gcc-3.0 warnings

2001-03-22 Thread Alan Cox
> page_cache_release(page); > -out: out:; does that trick > - default: > + default:; Agree - done > --- linux-2.4.2-ac21/net/ipv4/icmp.c.orig Thu Mar 22 23:39:22 2001 > +++ linux-2.4.2-ac21/net/ipv4/icmp.c Thu Mar 22 23:42:23 2001 Again out:; > goto

[PATCH] gcc-3.0 warnings

2001-03-22 Thread J . A . Magallon
Hi, kernel list readers. I have been building (and hopefully booting) ac-21 with gcc-3.0 snapshot dated 20010312. I have cleared the 99% of the warnings that 3.0 issues when building the kernel. Obviuosly, only in the main kernel part for i386 and the drivers I use. I suppose other arch will requ