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
jos...@codesourcery.com

Reply via email to