This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: wide char support and -fshort-wchar option


On Thu, Jul 31, 2014 at 1:31 AM, Mallikarjun Goudar
<mallikarjun.gouda@gmail.com> wrote:
>
> I would like to use wchar_t as unsigned short. I used -fshort-wchar
> option to make this happen.
> But i get following warnings when compile and link a test case.
>
> 'libc.a(ansi_files.o) uses 4-byte wchar_t yet the output is to use
> 2-byte wchar_t; use of wchar_t values across objects may fail"'
>
> To resolve this, i should be rebuilding gcc libraries with -fshort-wchar option?

libc.a is not a GCC library.  It's the C library, which does not come
with GCC.  To avoid that warning you will have to rebuild libc.a.  Or,
of course, you can ignore the warning and be careful not to pass
wchar_t values to libc.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]