if-2.c

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

C
31
字号
/* { dg-do preprocess } *//* { dg-options -pedantic-errors } *//* APPLE LOCAL -Wfour-char-constants *//* { dg-options "-Wfour-char-constants" { target *-apple-darwin* } } */#if 'a' != 'a' || '\001' != 1 || '\x12' != 0x12#error a,1,0x12 /* { dg-bogus "#error" "basic charconst recognition" } */#endif#if 'a' != L'a'#error L'a'	/* { dg-bogus "error" "wide charconst recognition 1" } */#endif#if L'\xfeed' != 0xfeed && L'\xfeed' != (0xfeed - 0x10000)#error 0xfeed	/* { dg-bogus "error" "wide charconst recognition 2" } */#endif#if L'\x1234' != 0x1234#error 0x1234	/* { dg-bogus "error" "wide charconst recognition 3" } */#endif/* The 'character constant (is )?too long' message is produced by 16-bit targets.  */#if 'abcd' /* { dg-warning "(multi-character character constant)|(character constant (is )?too long)" "multi-character charconst" } */#endif#if 'abcdefghi' /* { dg-error "character constant (is )?too long" "charconst too long" } */#endif#if '' /* { dg-error "empty character constant" "empty charconst" } */#endif

⌨️ 快捷键说明

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