<?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 std::runtime_error problems in Classic/Legacy CodeWarrior</title>
    <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/std-runtime-error-problems/m-p/139639#M1239</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;I am having problems with this:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;std::string error_info = "Hello";&lt;/DIV&gt;&lt;DIV&gt;std::runtime_error(error_info) --&amp;gt; this doesn't compile&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;but this:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;std::runtime_error("Hello") --&amp;gt; compile ok.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Does anyone know why??&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks a lot and best regards,&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Jun 2006 01:54:53 GMT</pubDate>
    <dc:creator>javi</dc:creator>
    <dc:date>2006-06-15T01:54:53Z</dc:date>
    <item>
      <title>std::runtime_error problems</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/std-runtime-error-problems/m-p/139639#M1239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;I am having problems with this:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;std::string error_info = "Hello";&lt;/DIV&gt;&lt;DIV&gt;std::runtime_error(error_info) --&amp;gt; this doesn't compile&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;but this:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;std::runtime_error("Hello") --&amp;gt; compile ok.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Does anyone know why??&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks a lot and best regards,&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Jun 2006 01:54:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/std-runtime-error-problems/m-p/139639#M1239</guid>
      <dc:creator>javi</dc:creator>
      <dc:date>2006-06-15T01:54:53Z</dc:date>
    </item>
    <item>
      <title>Re: std::runtime_error problems</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/std-runtime-error-problems/m-p/139640#M1240</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;You're syntax is defining two error_info variables.&lt;BR /&gt;To make it more clear, you code does the same bug as the following simple C code:&lt;BR /&gt;&lt;BR /&gt;int i;&lt;BR /&gt;long (i);&lt;BR /&gt;&lt;BR /&gt;So here is how it compiles:&lt;BR /&gt;&lt;BR /&gt;std::string error_info = "Hello";&lt;BR /&gt;std::runtime_error runtime_error_name(error_info);&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Daniel&lt;BR /&gt;&lt;BR /&gt;PS: Which compiler did you use, and which error message did you get? For mine (CF 6.3), the error message was actually clear, I got&lt;BR /&gt;&lt;BR /&gt;Error : object 'error_info' redefined&lt;BR /&gt;main.c line 17 std::runtime_error (error_info);&lt;BR /&gt;&lt;BR /&gt;Daniel&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Jun 2006 01:07:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/std-runtime-error-problems/m-p/139640#M1240</guid>
      <dc:creator>CompilerGuru</dc:creator>
      <dc:date>2006-06-19T01:07:56Z</dc:date>
    </item>
  </channel>
</rss>

