Forum Discussion
Altera_Forum
Honored Contributor
16 years agogcc alignment
I'm surprised. I have a C++ code that fills a char array and there seems to be an alignment problem with g++. See below: char* response = new char;
response = 0;
unsigned int* dataSize = (uns...
Altera_Forum
Honored Contributor
16 years agoWell, after a little search, I found that this behavior is "by design", and not a gcc bug. In x86 processors, the code works fine, because it's possible "to access" integers at any address. In nios2 apparently not.
Please, can someone tell me what is the correct way to fill an array without to worry about alignment issues?