<?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: +Onovolatile behavior in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/onovolatile-behavior/m-p/4537609#M678628</link>
    <description>&lt;P&gt;I can duplicate the problem. It seems references to volatile fail, pointers work.&lt;BR /&gt;Using +O3 also fixes it.&lt;/P&gt;</description>
    <pubDate>Sat, 27 Aug 2011 11:55:36 GMT</pubDate>
    <dc:creator>Dennis Handly</dc:creator>
    <dc:date>2011-08-27T11:55:36Z</dc:date>
    <item>
      <title>-Onovolatile behavior</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/onovolatile-behavior/m-p/4537600#M678619</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I have a question about the aCC 3.85 compiler option -Onovolatile.&lt;BR /&gt;&lt;BR /&gt;Does this compiler option trump any explicit volatile declarations in the source code?&lt;BR /&gt;&lt;BR /&gt;Thank you for your help,&lt;BR /&gt;David Ritter</description>
      <pubDate>Fri, 20 Nov 2009 18:18:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/onovolatile-behavior/m-p/4537600#M678619</guid>
      <dc:creator>David Ritter</dc:creator>
      <dc:date>2009-11-20T18:18:36Z</dc:date>
    </item>
    <item>
      <title>Re: -Onovolatile behavior</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/onovolatile-behavior/m-p/4537601#M678620</link>
      <description>Hi David:&lt;BR /&gt;&lt;BR /&gt;Perhaps this helps:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://docs.hp.com/en/14487/options.htm#opt+Onovolatile" target="_blank"&gt;http://docs.hp.com/en/14487/options.htm#opt+Onovolatile&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Fri, 20 Nov 2009 18:45:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/onovolatile-behavior/m-p/4537601#M678620</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2009-11-20T18:45:15Z</dc:date>
    </item>
    <item>
      <title>Re: -Onovolatile behavior</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/onovolatile-behavior/m-p/4537602#M678621</link>
      <description>Hi James,&lt;BR /&gt;&lt;BR /&gt;My project is using the volatile keyword, but in an optimized build the compiler seems to not be respecting it unless I explicitly tell the compiler -Ovolatile.&lt;BR /&gt;&lt;BR /&gt;Here is a simple test case:&lt;BR /&gt;// begin file&lt;BR /&gt;&lt;BR /&gt;void func( volatile int&amp;amp; foo ) {&lt;BR /&gt;    while(foo &amp;lt; 1000) {}&lt;BR /&gt;}&lt;BR /&gt;// end file&lt;BR /&gt;&lt;BR /&gt;compiling without -Ovolatile the compiler will emit the following warning:&lt;BR /&gt;&lt;BR /&gt;Infinite loop detected. Check for spinning on non-volatile variable.&lt;BR /&gt;&lt;BR /&gt;As noted, if I add -Ovolatile the warning goes away.&lt;BR /&gt;&lt;BR /&gt;Additionally I looked over the assembly code generated by the compiler and it appears that in the optimized build the volatile keyword is being stripped out and not respected.&lt;BR /&gt;&lt;BR /&gt;That is the source of my confusion.  I can't tell if this is a compiler bug or if I am doing something wrong.&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;BR /&gt;David Ritter</description>
      <pubDate>Fri, 20 Nov 2009 18:57:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/onovolatile-behavior/m-p/4537602#M678621</guid>
      <dc:creator>David Ritter</dc:creator>
      <dc:date>2009-11-20T18:57:26Z</dc:date>
    </item>
    <item>
      <title>Re: -Onovolatile behavior</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/onovolatile-behavior/m-p/4537603#M678622</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;Additionally the documentation you linked to was for aCC 6.20, which I understand to be for HP Itantium.  I am using aCC 3.85 on PA-RISC.&lt;BR /&gt;&lt;BR /&gt;I have access to the aCC 6.23 compiler and that compiler notes that -Ovolatile is not a supported compiler option.&lt;BR /&gt;&lt;BR /&gt;Thank you again for any additional insights.&lt;BR /&gt;&lt;BR /&gt;David Ritter</description>
      <pubDate>Fri, 20 Nov 2009 19:28:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/onovolatile-behavior/m-p/4537603#M678622</guid>
      <dc:creator>David Ritter</dc:creator>
      <dc:date>2009-11-20T19:28:25Z</dc:date>
    </item>
    <item>
      <title>Re: +Onovolatile behavior</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/onovolatile-behavior/m-p/4537604#M678623</link>
      <description>&lt;!-- !*# --&gt;&lt;P&gt;&amp;gt;Does this compiler option trump any explicit volatile declarations in the source code?&lt;BR /&gt;&lt;BR /&gt;No. You should not be using this option nor +Ovolatile, use the keywords. These are deprecated in aCC6.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;My project is using the volatile keyword, but in an optimized build the compiler seems to not be respecting it unless I explicitly tell the compiler +Ovolatile.&lt;BR /&gt;&amp;gt;compiling without +Ovolatile the compiler will emit the following warning:&lt;BR /&gt;&lt;BR /&gt;Yes, that shows the problem.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;I can't tell if this is a compiler bug&lt;BR /&gt;&lt;BR /&gt;It looks like one. Try using a pointer instead of a reference:&lt;BR /&gt;volatile int *foo_p = &amp;amp;foo:&lt;BR /&gt;while (*foo_p &amp;lt; 100)&lt;/P&gt;</description>
      <pubDate>Sat, 27 Aug 2011 11:53:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/onovolatile-behavior/m-p/4537604#M678623</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2011-08-27T11:53:53Z</dc:date>
    </item>
    <item>
      <title>Re: -Onovolatile behavior</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/onovolatile-behavior/m-p/4537605#M678624</link>
      <description>Hello Dennis,&lt;BR /&gt;&lt;BR /&gt;Your workaround of using an int pointer does address the compiler warning.  I will apply this workaround to our code base.  I much prefer this to the sledgehammer of the compiler option, especially since the message I am hearing from both of you is that +Ovolatile is not ever recommended.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Dave</description>
      <pubDate>Mon, 23 Nov 2009 15:49:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/onovolatile-behavior/m-p/4537605#M678624</guid>
      <dc:creator>David Ritter</dc:creator>
      <dc:date>2009-11-23T15:49:10Z</dc:date>
    </item>
    <item>
      <title>Re: +Onovolatile behavior</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/onovolatile-behavior/m-p/4537606#M678625</link>
      <description>&lt;P&gt;Have you contacted the Response Center yet to report the problem?&lt;BR /&gt;&lt;BR /&gt;&amp;gt;since the message I am hearing from both of you&lt;BR /&gt;&lt;BR /&gt;You mean me and me? (Since I removed the option. :-)&lt;/P&gt;</description>
      <pubDate>Sat, 27 Aug 2011 11:54:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/onovolatile-behavior/m-p/4537606#M678625</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2011-08-27T11:54:29Z</dc:date>
    </item>
    <item>
      <title>Re: -Onovolatile behavior</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/onovolatile-behavior/m-p/4537607#M678626</link>
      <description>I meant you and James (the other person that replied to my post).&lt;BR /&gt;&lt;BR /&gt;I have been unable to find our Response Center login information so far to file an issue.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Dave</description>
      <pubDate>Mon, 23 Nov 2009 16:49:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/onovolatile-behavior/m-p/4537607#M678626</guid>
      <dc:creator>David Ritter</dc:creator>
      <dc:date>2009-11-23T16:49:06Z</dc:date>
    </item>
    <item>
      <title>Re: +Onovolatile behavior</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/onovolatile-behavior/m-p/4537608#M678627</link>
      <description>&lt;P&gt;&amp;gt;I meant you and James.&lt;BR /&gt;&lt;BR /&gt;And I meant that James was pointing to info I had added. And now I have removed the option for Integrity.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Aug 2011: And removed in A.06.26.&lt;/P&gt;</description>
      <pubDate>Sat, 27 Aug 2011 11:56:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/onovolatile-behavior/m-p/4537608#M678627</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2011-08-27T11:56:10Z</dc:date>
    </item>
    <item>
      <title>Re: +Onovolatile behavior</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/onovolatile-behavior/m-p/4537609#M678628</link>
      <description>&lt;P&gt;I can duplicate the problem. It seems references to volatile fail, pointers work.&lt;BR /&gt;Using +O3 also fixes it.&lt;/P&gt;</description>
      <pubDate>Sat, 27 Aug 2011 11:55:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/onovolatile-behavior/m-p/4537609#M678628</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2011-08-27T11:55:36Z</dc:date>
    </item>
    <item>
      <title>Re: -Onovolatile behavior</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/onovolatile-behavior/m-p/4537610#M678629</link>
      <description>Thank you for the additional information.  We have opted to use the pointer based workaround that you suggested, but it is good to know using +O3 is also a potential workaround if needed.&lt;BR /&gt;&lt;BR /&gt;Thank you for your help regarding this Dennis.&lt;BR /&gt;&lt;BR /&gt;David Ritter</description>
      <pubDate>Tue, 24 Nov 2009 19:14:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/onovolatile-behavior/m-p/4537610#M678629</guid>
      <dc:creator>David Ritter</dc:creator>
      <dc:date>2009-11-24T19:14:28Z</dc:date>
    </item>
  </channel>
</rss>

