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 Fri, 17 Aug 2018, Jeff Law wrote:

> > WCHAR_TYPE_SIZE is wrong because it doesn't account for flag_short_wchar.  
> > As far as I can see only ada/gcc-interface/targtyps.c uses WCHAR_TYPE_SIZE 
> > now.  TYPE_PRECISION (wchar_type_node) / BITS_PER_UNIT is what should be 
> > used.
> But that's specific to the c-family front-ends.
> 
> There's MODIFIED_WCHAR_TYPE which is ultimately used to build
> wchar_type_node for the c-family front-ends.  Maybe we could construct
> something from that.

If you do that, probably you want to move 
fortran/trans-types.c:get_typenode_from_name (which converts the strings 
used in target macros such as WCHAR_TYPE to the corresponding types) into 
generic code.

-- 
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]