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] convert braced initializers to strings (PR 71625)


On 08/07/2018 05:31 AM, Joseph Myers wrote:
On Tue, 7 Aug 2018, Martin Sebor wrote:

2) skipping embedded nuls made it possible to create a string
with fewer elements than the initializer array, which caused
arrays with unspecified bound to be smaller than they would
have been otherwise

I think there should be explicit tests of sizeof for arrays with
unspecified bound - to make sure both that it isn't any smaller than it
should be, but also that any NULs implicitly added for a STRING_CST don't
make the arrays any larger than their size should be for the originally
given initializer that doesn't have a 0 as the last element.

I added some more tests to the latest revision of the patch.
Please see it in my other response.

Thanks
Martin


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