This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch for various warnings in gcc
- From: Michael Matz <matz at suse dot de>
- To: Zack Weinberg <zack at codesourcery dot com>
- Cc: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>,<gcc-patches at gcc dot gnu dot org>
- Date: Thu, 8 Aug 2002 20:24:42 +0200 (CEST)
- Subject: 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.