This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch for various warnings in gcc


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]