About address alignment of unicode string data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello:
    I have question about GCC which is in different behavior with MS VC.
    See following code:
    wchar_t *TestStr = L"MyString";
    If built by MSVC, the address TestStr would align at 16-bit boundary
that mean TestStr's address is even. Because the data of L"MyString" is
unicode code string.
    But if build by GCC, the address of TestStr is even or odd but not
always even.
    I have tried many GCC compiler options but seems not compiler
options can make the address of TestStr align to even address. My GCC
version is 4.0.2.
 
    Who can tell me how to control the alignment of const Unicode data
L"" in GCC? 
    Thanks.   

- K 
 
Best Regard!
------------------------------------------------------------------------
------------
Hear and you forget; see and you remember; do and you understand.
--Confucius
"The content of this message is my personal opinion only and although I
am an employee of Intel, the statements I make here in no way represent
Intel's position on the issue, nor am I authorized to speak on behalf of
Intel on this matter"


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux