Re: [PATCH] gcc-3.0 warnings

Horst von Brand (vonbrand@inf.utfsm.cl)
Fri, 23 Mar 2001 13:12:03 -0400


"J . A . Magallon" <jamagallon@able.es> 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 suppose other arch will require a similar
> cleanup.
>
> All are related to multiline strings in asm() sentences, that seem to have
> been deprecated, and out: or default: labels at the end of blocks. Pathc
> is inlined.

The problem with labels at the end of blocks, like so:

{
....
goto out;
....
out:
}

is that this is not legal C: The label should be part of a sentence, and
there is none. Just write (note the ';' after the label):

{
....
goto out;
....
out: ;
}

(Yes, this is ugly).

-- 
Dr. Horst H. von Brand                       mailto:vonbrand@inf.utfsm.cl
Departamento de Informatica                     Fono: +56 32 654431
Universidad Tecnica Federico Santa Maria              +56 32 654239
Casilla 110-V, Valparaiso, Chile                Fax:  +56 32 797513
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/