Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
Announcements
The Intel sign-in experience has changed to support enhanced security controls. If you sign in, click here for more information.
7779 Discussions

Feature Request: Better Warning for Invalid `alignas(...)`

Ian_Mallett1
Beginner
162 Views

If you do something like `alignas(sizeof(NonPoTStruct))`, you get:
error : invalid alignment value specified by attribute

This says what is wrong, but isn't very useful. As a hopefully minor tweak, how about something like:
error : invalid alignment value (12) specified by attribute (not a power-of-two)

Would have saved me a bit of time.

0 Kudos
1 Reply
Kittur_G_Intel
Employee
162 Views

Thanks Ian, yes makes sense. I'll file the feature request with the developers accordingly, appreciate much.

Kittur

Reply