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: C++ PATCH for c++/34772 (warning about self-initialization without -Winit-self)


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.


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