-
Notifications
You must be signed in to change notification settings - Fork 16.3k
Open
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillac++clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"confirmedVerified by a second partyVerified by a second party
Description
| Bugzilla Link | 47877 |
| Version | trunk |
| OS | Linux |
| Reporter | LLVM Bugzilla Contributor |
| CC | @AaronBallman,@DougGregor,@zygoloid |
Extended Description
Hi, the following code allocates memory for an integer variable a with 5, which is not an integral power of two. However, Clang accepts it.
Please take a look at paragraph [4]:
http://eel.is/c++draft/basic.align
$ cat s.cpp
void * a = new int __attribute__ ((aligned (5)))();
$ g++ -c s.cpp
s.cpp:1:48: error: requested alignment ‘5’ is not a positive power of 2
1 | void * a = new int __attribute__ ((aligned (5)))();Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillac++clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"confirmedVerified by a second partyVerified by a second party