public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/18165] New: Attributes following enumeration declaration ignored
@ 2004-10-26 21:50 austern at apple dot com
  2004-10-26 21:56 ` [Bug c++/18165] " pinskia at gcc dot gnu dot org
  0 siblings, 1 reply; 2+ messages in thread
From: austern at apple dot com @ 2004-10-26 21:50 UTC (permalink / raw)
  To: gcc-bugs

Consider the following program:
m>

enum X { a = 1 };
enum Y { b = 1 } __attribute__((packed));

int main()
{
  using namespace std;
  cout << "default:        " << sizeof(enum X) << endl;
  cout << "with attribute: " << sizeof(enum Y) << endl;
}

The C++ compiler accepts this.  However, the attribute on enum Y is ignored.  As running this program 
shows, the size of enum Y is the same as the size of enum X.

Note that the test suite contains a test to make sure that an attribute in this position is accepted.  
(parse/parse3.C) We just failed to make sure that the attribute really did anything.

-- 
           Summary: Attributes following enumeration declaration ignored
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: austern at apple dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: powerpc-apple-darwin7.5.0
  GCC host triplet: powerpc-apple-darwin7.5.0
GCC target triplet: powerpc-apple-darwin7.5.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18165


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug c++/18165] Attributes following enumeration declaration ignored
  2004-10-26 21:50 [Bug c++/18165] New: Attributes following enumeration declaration ignored austern at apple dot com
@ 2004-10-26 21:56 ` pinskia at gcc dot gnu dot org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-26 21:56 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-10-26 21:56 -------


*** This bug has been marked as a duplicate of 14124 ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18165


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-10-26 21:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-26 21:50 [Bug c++/18165] New: Attributes following enumeration declaration ignored austern at apple dot com
2004-10-26 21:56 ` [Bug c++/18165] " pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).