Patch for various warnings in gcc

Michael Matz matz@suse.de
Thu Aug 8 11:24:00 GMT 2002


Hi,

On Thu, 8 Aug 2002, Zack Weinberg wrote:

> Personally I agree with Dale that 'int a = a;' is too obscure a way of
> silencing this warning.

Maybe.  This exact topic even came up in the past, and some people found
it Ok.  Some didn't (see the threads connected with
http://gcc.gnu.org/ml/gcc/2002-02/msg00401.html ), and at that time it
also was proposed to implement a better way to silence this warning.  But
AFAIK this isn't done yet.

> If we must have a way to disable it without generating extra code, let
> us create __attribute__ ((initialized)) which states explicitly what
> is going on.

I completely agree, but I have no idea about the frontend, and how to
add attributes and connect them to trees.  If I had, I would change
function.c:uninitialized_vars_warning() to check that additionally on the
decls in the current block.


Ciao,
Michael.



More information about the Gcc-patches mailing list