c++/7585: Attributes for nested typedef-name ignored
gdr@nerim.net
gdr@nerim.net
Tue Aug 13 09:36:00 GMT 2002
>Number: 7585
>Category: c++
>Synopsis: Attributes for nested typedef-name ignored
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Aug 13 07:46:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Gabriel Dos Reis <gdr@nerim.net>
>Release: unknown-1.0
>Organization:
>Environment:
Plateform independent
>Description:
cc1plus ignores attributes for nested typedef-names.
This seems to happen only for typedef-names.
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/plain; name="alignof-nested-type.C"
Content-Disposition: inline; filename="alignof-nested-type.C"
#include <stdio.h>
struct A {
struct X { } __attribute__((__aligned__(__alignof__(int))));
typedef struct { } Y __attribute__((__aligned__(__alignof__(int))));
};
int main()
{
printf("alignof(A::X) = %d;\t should be %d\n",
__alignof__(A::X), __alignof__(int));
printf("alignof(A::Y) = %d;\t should be %d\n",
__alignof__(A::Y), __alignof__(int));
}
More information about the Gcc-prs
mailing list