Details

[Home]

Issue of the Standard # S0449

Brief

Possible misprint in the declaration of wchar_t.

Detailed Description

In LSB 3.1 stddef.h (13.4. Data Definitions for libc, 13.4.44. stddef.h) wchar_t is defined as int:
typedef int wchar_t;
However, for gcc on RHEL4 (intel) wchar_t is defined as long int.
gcc compiles the example below without any messages, while lsb-cc compiles with the following error:
bbb.c:3: error: array of inappropriate type initialized from string constant
Example:
#include <stdio.h> wchar_t aaa[] = L"Hello, world!"; int main() { wprintf(L"%ls\n",aaa); return 0; }

Problem location(s) in the standard

Linux Standard Base Core Specification 3.1, Chapter 13. Base Libraries, 13.4. Data Definitions for libc, 13.4.44. stddef.h.

Accepted

LSB Bugzilla, 1512

Status

Fixed in LSB 3.2

[Home]