From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29634 invoked by alias); 1 Aug 2014 15:34:47 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 29624 invoked by uid 89); 1 Aug 2014 15:34:46 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_40,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-oi0-f54.google.com Received: from mail-oi0-f54.google.com (HELO mail-oi0-f54.google.com) (209.85.218.54) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Fri, 01 Aug 2014 15:34:45 +0000 Received: by mail-oi0-f54.google.com with SMTP id i138so2868258oig.27 for ; Fri, 01 Aug 2014 08:34:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=BReSoePjI6huy/Eay4QROmgqxciXgDNnHXxLaRvH94c=; b=b3Rw0mmFoeStY3QcX8Lk663EmIONpyzpYIdBFfEEl1gC0h5VJQKu9OPntz2KeiCtnR sU8bZkGKL3DjmwiDExPZXggyy8r20mUhNM0oLO91UmLpWeRxMAjPWjqejoT8lDqcgZVu kOlUnbAxQ+mSJlf4YKP4xzsbmee2NOYyJ/jYP2adgFZuThzG+pcn5McY+YEetK+XX8qu nU0JyBMI4uHWiH3It/Wf7/1j41cPdV7lZ4gA1If+mjfldNGpTtQ6lcmC96czkHdj0ZXI QcvIDgpugnJV/WtGrhUY58gY3pg1NHCWMKJHH0+S4vvFUpDOJV5ocopeQQZSL9kqt5aA CEKw== X-Gm-Message-State: ALoCoQmRlYNCUjsFUbhRaFTqmpsoBUFVDc3vWHMkq0l7kU6+uxXu6shFEGLjHQb6sVAkBOcc+ENm MIME-Version: 1.0 X-Received: by 10.182.3.100 with SMTP id b4mr9417197obb.79.1406907283567; Fri, 01 Aug 2014 08:34:43 -0700 (PDT) Received: by 10.60.39.228 with HTTP; Fri, 1 Aug 2014 08:34:43 -0700 (PDT) In-Reply-To: References: Date: Fri, 01 Aug 2014 15:34:00 -0000 Message-ID: Subject: Re: wide char support and -fshort-wchar option From: Ian Lance Taylor To: Mallikarjun Goudar Cc: "gcc-help@gcc.gnu.org" Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-08/txt/msg00006.txt.bz2 On Thu, Jul 31, 2014 at 1:31 AM, Mallikarjun Goudar 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