[V1][PATCH 1/3] Provide element_count attribute to flexible array member field (PR108896)
Qing Zhao
qing.zhao@oracle.com
Fri May 26 19:09:17 GMT 2023
> On May 26, 2023, at 2:15 PM, Joseph Myers <joseph@codesourcery.com> wrote:
>
> On Fri, 26 May 2023, Qing Zhao via Gcc-patches wrote:
>
>>> What if the string is a wide string? I don't expect that to work (either
>>> as a matter of interface design, or in the present code), but I think that
>>> case should have a specific check and error.
>>
>> Dump question: how to check whether the string is a wide string? -:)
>
> By examining the element type; the only valid case for the attribute would
> be an element type of (const) char. (I think it's reasonable to reject
> all of char8_t, char16_t, char32_t, wchar_t strings in this context.)
Okay, will study a little bit and do this.
Thanks
Qing
>
> --
> Joseph S. Myers
> joseph@codesourcery.com
More information about the Gcc-patches
mailing list