This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C++ PATCH for c++/34772 (warning about self-initialization without -Winit-self)
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Jason Merrill <jason at redhat dot com>
- Cc: gcc-patches List <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 21 May 2011 10:31:45 -0700
- Subject: Re: C++ PATCH for c++/34772 (warning about self-initialization without -Winit-self)
- References: <4DC824D2.2060203@redhat.com>
On Mon, May 9, 2011 at 10:30 AM, Jason Merrill <jason@redhat.com> wrote:
> In this testcase -Wuninitialized was warning about 'int i = i' without
> -Winit-self because the C++ front end always uses separate code for
> non-constant initialization. ?But for simple initialization, it makes sense
> to use DECL_INITIAL.
>
> Tested x86_64-pc-linux-gnu, applying to trunk.
>
> commit b105bfbee01e9183e7fc100f3a33c7c109db7fae
> Author: Jason Merrill <jason@redhat.com>
> Date: ? Sat May 7 17:31:09 2011 -0400
>
> ? ? ? ?PR c++/34772
> ? ? ? ?* decl.c (initialize_local_var): Use DECL_INITIAL for simple
> ? ? ? ?initialization.
>
This caused:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49092
--
H.J.