<?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 aCC enum bug in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/acc-enum-bug/m-p/3824531#M100448</link>
    <description>aCC 3.57 fails to compile this code, which is valid C++ and compiles with gcc, MSVC*, and more.&lt;BR /&gt;&lt;BR /&gt;---&lt;BR /&gt;&lt;BR /&gt;class A {&lt;BR /&gt;};&lt;BR /&gt;&lt;BR /&gt;class B {&lt;BR /&gt;    enum {&lt;BR /&gt;       A,&lt;BR /&gt;       C = A&lt;BR /&gt;    };&lt;BR /&gt;};&lt;BR /&gt;&lt;BR /&gt;---&lt;BR /&gt;&lt;BR /&gt;Error 24: "main.cpp", line 7 # '&lt;IDENTIFIER&gt;' expected instead of 'A'.&lt;BR /&gt;           C = A&lt;BR /&gt;               ^&lt;BR /&gt;Error 216: "main.cpp", line 8 # Integer constant expected in enumerator initialization.&lt;BR /&gt;        };&lt;BR /&gt;        ^&lt;BR /&gt;&lt;/IDENTIFIER&gt;</description>
    <pubDate>Mon, 17 Jul 2006 02:08:33 GMT</pubDate>
    <dc:creator>Andreas Aardal Hanssen</dc:creator>
    <dc:date>2006-07-17T02:08:33Z</dc:date>
    <item>
      <title>aCC enum bug</title>
      <link>https://community.hpe.com/t5/operating-system-linux/acc-enum-bug/m-p/3824531#M100448</link>
      <description>aCC 3.57 fails to compile this code, which is valid C++ and compiles with gcc, MSVC*, and more.&lt;BR /&gt;&lt;BR /&gt;---&lt;BR /&gt;&lt;BR /&gt;class A {&lt;BR /&gt;};&lt;BR /&gt;&lt;BR /&gt;class B {&lt;BR /&gt;    enum {&lt;BR /&gt;       A,&lt;BR /&gt;       C = A&lt;BR /&gt;    };&lt;BR /&gt;};&lt;BR /&gt;&lt;BR /&gt;---&lt;BR /&gt;&lt;BR /&gt;Error 24: "main.cpp", line 7 # '&lt;IDENTIFIER&gt;' expected instead of 'A'.&lt;BR /&gt;           C = A&lt;BR /&gt;               ^&lt;BR /&gt;Error 216: "main.cpp", line 8 # Integer constant expected in enumerator initialization.&lt;BR /&gt;        };&lt;BR /&gt;        ^&lt;BR /&gt;&lt;/IDENTIFIER&gt;</description>
      <pubDate>Mon, 17 Jul 2006 02:08:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/acc-enum-bug/m-p/3824531#M100448</guid>
      <dc:creator>Andreas Aardal Hanssen</dc:creator>
      <dc:date>2006-07-17T02:08:33Z</dc:date>
    </item>
    <item>
      <title>Re: aCC enum bug</title>
      <link>https://community.hpe.com/t5/operating-system-linux/acc-enum-bug/m-p/3824532#M100449</link>
      <description>Andreas,&lt;BR /&gt;I have only ever seen either:&lt;BR /&gt;enum{A,C};&lt;BR /&gt;or&lt;BR /&gt;enum{A,C=4);&lt;BR /&gt;After compiling your code in gcc, what happens at that statement,if you run it?&lt;BR /&gt;&lt;BR /&gt;aCC may not let you compile because it could generate an invalid condition.</description>
      <pubDate>Mon, 17 Jul 2006 07:34:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/acc-enum-bug/m-p/3824532#M100449</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2006-07-17T07:34:32Z</dc:date>
    </item>
    <item>
      <title>Re: aCC enum bug</title>
      <link>https://community.hpe.com/t5/operating-system-linux/acc-enum-bug/m-p/3824533#M100450</link>
      <description>Enum values can always take the value of other enum values. This is commonly used in API design when an enum entry needs to be renamed, yet keep the same value. The condition is not invalid.&lt;BR /&gt;&lt;BR /&gt;enum {&lt;BR /&gt;    A,&lt;BR /&gt;    B,&lt;BR /&gt;    C = A // Value = 0.&lt;BR /&gt;};&lt;BR /&gt;&lt;BR /&gt;This is also what happens when compiling it. C = A is the same as C = 0. aCC cannot compile this code; it's a bug in aCC :-).</description>
      <pubDate>Mon, 17 Jul 2006 07:50:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/acc-enum-bug/m-p/3824533#M100450</guid>
      <dc:creator>Andreas Aardal Hanssen</dc:creator>
      <dc:date>2006-07-17T07:50:36Z</dc:date>
    </item>
    <item>
      <title>Re: aCC enum bug</title>
      <link>https://community.hpe.com/t5/operating-system-linux/acc-enum-bug/m-p/3824534#M100451</link>
      <description>Andreas is right, it is a bug.&lt;BR /&gt;It works fine with aCC6 and with A.03.67, PHSS_34414&lt;BR /&gt;&lt;BR /&gt;It is CR JAGae88844: Error 24 Unable to distinguish b/w tentative class and enum constant</description>
      <pubDate>Tue, 18 Jul 2006 03:44:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/acc-enum-bug/m-p/3824534#M100451</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2006-07-18T03:44:28Z</dc:date>
    </item>
  </channel>
</rss>

