inttypes-wchar-2.c
来自「Mac OS X 10.4.9 for x86 Source Code gcc」· C语言 代码 · 共 27 行
C
27 行
/* APPLE LOCAL file test that the definition of wchar_t in inttypes.h gives sizeof(wchar_t) == 2 when using -fshort-wchar. *//* { dg-do run } *//* { dg-options "-Wall -W -fshort-wchar" } */#include <inttypes.h>#include <stdint.h>/* Verify that WCHAR_MAX is the largest unsigned 16-bit integer. */#if WCHAR_MAX != 0xffffU# error WCHAR_MAX has incorrect value#endif/* Verify that WCHAR_MIN is 0 */#if WCHAR_MIN != 0# error WCHAR_MIN has incorrect value#endifint dummy1[3 - sizeof(wchar_t)] = { 0 };int dummy2[sizeof(wchar_t) - 1] = { 0 };int main (){ return (sizeof(wchar_t) == 2) ? 0 : 1;}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?