inttypes-wchar-1.c

来自「Mac OS X 10.4.9 for x86 Source Code gcc」· C语言 代码 · 共 27 行

C
27
字号
/* APPLE LOCAL file test of wchar_t's definition in inttypes.h *//* { dg-do run } *//* { dg-options "-Wall -W" } */#include <inttypes.h>#include <stdint.h>/* Verify that WCHAR_MAX is the largest positive 32-bit integer */#if WCHAR_MAX != 0x7fffffff#  error WCHAR_MAX has incorrect value#endif/* Verify that WCHAR_MIN is negative and consistent with WCHAR_MAX. */#if WCHAR_MIN != (-WCHAR_MAX-1)#  error WCHAR_MIN has incorrect value#endifint dummy1[5 - sizeof(wchar_t)] = { 0 };int dummy2[sizeof(wchar_t) - 3] = { 0 };int main (){  /* Verify that wchar_t is a 32-bit type. */  return (sizeof(wchar_t) == 4) ? 0 : 1;}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?