1 msgCan I enforce the inlining of the STL algorithms?
4 msgconfiguration in gcc build
2 msgBuild report for gcc 4.1.1 on Cygwin
4 msgsome flaws in gcc build: where is the gfortran ?
1 msgHelp for data prefetch for sparc using gcc
1 msgfriend template
2 msgGCJ - undefined reference
2 msghorrible link times with g++ 4.1.1 and -g
6 msgarm-elf-gcc shared flat support
1 msgg++-4.3 alignas(const-expr) fails; workaround?
3 msgCode Generator: usage of the #line directive
2 msgGDB-6.4 Build

About address alignment of unicode string data
\ Lu, Ken (30 Mar 2007)

5 msgHow to read the linker map file?
2 msgCheck of throw qualifiers
1 msgg++ option to generate code after template inst...
2 msgInstalling gcc: compiler?
1 msgnewlib and interworking
1 msggcc-3.4.6 build failed for Ada
3 msgasm problem with and without -fPIC on x86
Subject:About address alignment of unicode string data
Group:Gcc-help
From:Lu, Ken
Date:30 Mar 2007


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"


© 2004-2008 readlist.com