This is the mail archive of the gcc-bugs@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]

[Bug c/47599] -fno-short-wchar does not force long wchar


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47599

--- Comment #5 from Bastien ROUCARIES <roucaries.bastien+bugs at gmail dot com> 2011-02-04 09:25:36 UTC ---
ok thanks it is defined in the header and in this case they are two bugs.

Try the following program

#include <stdio.h>
typedef __WCHAR_TYPE__ wchar_t;
wchar_t a[] = L"aa";
int s  = sizeof(wchar_t);

void main()
{
  printf("%i\n",s);
}

under linux it output 4
under linux with -fno-short-char it output 4
under linux with -fshort-char it output 2

under cygwin it output 2
nder linux with -fno-short-char it output 2 (BUG here)
under linux with -fshort-char it output 2


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