<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: New installation CW10.6, casting errors (printf cant show negative values) in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/New-installation-CW10-6-casting-errors-printf-cant-show-negative/m-p/431501#M14430</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Carl,&lt;/P&gt;&lt;P&gt;Weird.&amp;nbsp; I see it too.&lt;/P&gt;&lt;P&gt;Will report to the MQX Development team for them to look into.&lt;/P&gt;&lt;P&gt;Wondering if the default type casting of "char" has changed.&lt;/P&gt;&lt;P&gt;If I run your test with:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp; printf("test result = %u\r\n", 0xFF);&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp; printf("test result = %d\r\n", (char)0xFF);&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp; printf("test result = %d\r\n", (signed char)0xFF);&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get on terminal this:&lt;/P&gt;&lt;P&gt;test result = 255&lt;/P&gt;&lt;P&gt;test result = 255&lt;/P&gt;&lt;P&gt;test result = -1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;David &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 May 2015 16:31:44 GMT</pubDate>
    <dc:creator>DavidS</dc:creator>
    <dc:date>2015-05-14T16:31:44Z</dc:date>
    <item>
      <title>New installation CW10.6, casting errors (printf cant show negative values)</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/New-installation-CW10-6-casting-errors-printf-cant-show-negative/m-p/431500#M14429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Code snippet:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("test result = %i\r\n", 0xFF);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("test result = %i\r\n", (char)0xFF);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Simple code that I have run on my cygwin gcc, codepad.org and visual studio all return the expected result:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;test result = 255&lt;/P&gt;&lt;P&gt;test result = -1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Run this code on my new MQX4.1.1 build with up to date CW10.6 (win7 64bit) and get:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;test result = 255&lt;/P&gt;&lt;P&gt;test result = 255&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Problem is this worked on my old windows build (also a fresh installation), so what changed? what setting could affect this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Obviously I have dumbed this down but this is a serious probelm for my code which has been working on MQX4.1.1 up to date, and now has stopped (all i did was rebuild my computer and fresh install this).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 May 2015 07:02:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/New-installation-CW10-6-casting-errors-printf-cant-show-negative/m-p/431500#M14429</guid>
      <dc:creator>CarlFST60L</dc:creator>
      <dc:date>2015-05-14T07:02:48Z</dc:date>
    </item>
    <item>
      <title>Re: New installation CW10.6, casting errors (printf cant show negative values)</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/New-installation-CW10-6-casting-errors-printf-cant-show-negative/m-p/431501#M14430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Carl,&lt;/P&gt;&lt;P&gt;Weird.&amp;nbsp; I see it too.&lt;/P&gt;&lt;P&gt;Will report to the MQX Development team for them to look into.&lt;/P&gt;&lt;P&gt;Wondering if the default type casting of "char" has changed.&lt;/P&gt;&lt;P&gt;If I run your test with:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp; printf("test result = %u\r\n", 0xFF);&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp; printf("test result = %d\r\n", (char)0xFF);&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp; printf("test result = %d\r\n", (signed char)0xFF);&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get on terminal this:&lt;/P&gt;&lt;P&gt;test result = 255&lt;/P&gt;&lt;P&gt;test result = 255&lt;/P&gt;&lt;P&gt;test result = -1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;David &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 May 2015 16:31:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/New-installation-CW10-6-casting-errors-printf-cant-show-negative/m-p/431501#M14430</guid>
      <dc:creator>DavidS</dc:creator>
      <dc:date>2015-05-14T16:31:44Z</dc:date>
    </item>
    <item>
      <title>Re: New installation CW10.6, casting errors (printf cant show negative values)</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/New-installation-CW10-6-casting-errors-printf-cant-show-negative/m-p/431502#M14431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Its actually far worse for us. I have a project that that is around 512K and there are strange things happening with variables being passed to functions, and worse, when two variables are being cast and compared with each other the results are wrong.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 May 2015 23:20:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/New-installation-CW10-6-casting-errors-printf-cant-show-negative/m-p/431502#M14431</guid>
      <dc:creator>CarlFST60L</dc:creator>
      <dc:date>2015-05-14T23:20:59Z</dc:date>
    </item>
  </channel>
</rss>

