<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Hi,<br>
<br>
I have altered<font size="2"> <span style="font-size:10pt;"><font size="2"><span style="font-size:10pt;"></span></font>isSignedCharDefault() to make 'char' unsigned for the xcore target too.<br>
(The signedness of 'char' is an ABI issue as far a the standard is concerned.)<br>
<br>
</span></font>My problem now is that char-bitfields are also being made unsigned.<br>
According to the standard the members of a bitfield are always signed unless explicitly marked unsigned.<br>
<br>
Hence I need:<br>
'char' to be unsigned.<br>
but the bit field 'char' to be signed.<br>
<br>
viz:<br>
// ABI requires plain 'char' to be unsigned<br>
char c = (char)-1;<br>
assert(c >= 0);<br>
<br>
// members of a bitfield are always signed unless explicitly marked unsigned<br>
struct char_sign { char x : 1; };<br>
char_sign.x = 1;<br>
assert(char_sign.x < 0);<br>
<br>
<br>
Is this possible in clang?<br>
If not, could anyone like to point me in the right direction to where the fix would be necessary?<br>
<br>
Thank you<br>
<br>
Robert<br>
<br>
<br>
</div>
</body>
</html>