This is the mail archive of the gcc@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: warning: '<some_var>' may be used uninitialized in this function


Christian.Iseli@licr.org wrote:


> But... it used to be the case that the compiler didn't try to warn about
> uninitialized variables embedded in structs (or so I seem to remember...)
> So I was wondering if this was some kind of regression...

  I would consider that to be a bug, not a feature.  Just because an object is
in a struct doesn't mean its initialisation status is the same as that of the
other objects in the struct, that's a false inference, and there's a whole
category of bugs that revolve around partially initialising a struct but
forgetting one (or more) of the members, so I'd suggest that this was never a
partiuclarly desirable way for the warning to work anyway.

    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


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