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] Add a character size parameter to c_strlen/get_range_strlen


On Tue, 21 Aug 2018, Martin Sebor wrote:

> Sure, but the only valid argument to %ls is wchar_t*.  Passing
> it something else is undefined.

Well, (wchar_t *)"something\0\0\0\0" would be OK given 
-fno-strict-aliasing and if you know the alignment is OK.  Do we have that 
information about the type cast to, as opposed to the type of the string 
constant, at this point?

-- 
Joseph S. Myers
joseph@codesourcery.com


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