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
On Thu, Aug 08, 2002 at 01:57:29PM -0400, Kaveh R. Ghazi wrote:
> > Personally I agree with Dale that 'int a = a;' is too obscure a way of
> > silencing this warning. 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.
>
> The attribute would be more readable but it would still suffer from
> the non-determinism, right?
Yes. This would not be for use in GCC itself. Paul has a good point
that in some contexts the extra initialization is too costly, but the
'a=a' idiom is not documented, nor is it obvious to a reader that its
sole effect is to silence this warning. So I think we should have a
more readable way to get that effect.
zw