-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Closed
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillaclang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"
Description
| Bugzilla Link | 10819 |
| Resolution | FIXED |
| Resolved on | Mar 09, 2012 04:26 |
| Version | 2.9 |
| OS | All |
| Reporter | LLVM Bugzilla Contributor |
Extended Description
#pragma pack ignored for template structures. Tested on clang 2.9 on mac and win32. Code:
#include
#pragma pack(1)
struct A
{
int a;
char b;
int c;
};
template
struct B
{
T a;
char b;
T c;
};
int main ()
{
printf ("sizeof A = %u\n", sizeof (A));
printf ("sizeof B = %u\n", sizeof (B));
return 0;
}
Prints:
sizeof A = 9
sizeof B = 12
Should print:
sizeof A = 9
sizeof B = 9
Metadata
Metadata
Assignees
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillaclang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"