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: [PATCH, PR 57748] Check for out of bounds access, Part 2


> But if zero-sized arrays everywhere in a structure is valid C,
> then the attached test case is a valid test case.

Not necessarily, you can write the declaration but you cannot index the array, 
i.e. this is undefined behavior.  And there is nothing new, distinct fields 
have been disambiguated in alias.c for ages.

-- 
Eric Botcazou


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