I want to make some static constants globally visible. I'm pretty familiar how to do that in C++. The problem is that these constants need to be aligned to some exotic boundary. Do I have to specify the alignment in extern declaration? I'm using GCC4.5
in *.cpp file
static const constant_t constant __attribute__((aligned(64))) = {blah,blah,blah};
in *.h file
//Which one is correct?
extern const constant_t constant;
extern const constant_t constant __attribute__((aligned(64)));