This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH, C] Fix PR40563
On Wed, 28 Jul 2010, Shujing Zhao wrote:
> > Why do you need to recurse down among fields? Why isn't checking
> > C_TYPE_FIELDS_READONLY enough?
> It used to notice which field should be initialized, just like the diagnostics
> at c++. If the notice is not very necessary, C_TYPE_FIELDS_READONLY is enough.
You could always check C_TYPE_FIELDS_READONLY before recursing to find the
field in question.
> > What if the original uninitialized object is not a structure but an array of
> > structures? Will you diagnose things in that case?
> C++ would not error an uninitialized array of structure that has a const
> member. So I think it doesn't need warn at C?
Could you please give references to the relevant sections of the C++
standard that explain exactly what is or is not permitted in this regard?
Joseph S. Myers