AnsweredAssumed Answered

Data Member Alignment

Question asked by petrveprek on Feb 28, 2017
Latest reply on Mar 7, 2017 by Kader.M



I have a C++ header file with class declaration.  Part of the declaration is a data member.

 int a;

I need to ensure correct alignment.  According to documentation I should be able to do the following.

int a __attribute__ ((aligned (8)));

However, I get an error.

".\foo.h", line 92: cc0065: error: expected a ";"
                int a __attribute__ ((aligned (8)));

I am using CCES 2.1.0.

How can I use the variable alignment attribute?