pr19606.c
来自「用于进行gcc测试」· C语言 代码 · 共 35 行
C
35 行
/* PR c/19606 The C front end used to shorten the type of a division to a type that does not preserve the semantics of the original computation. Make sure that won't happen. */signed char a = -4;intfoo (void){ return ((unsigned int) (signed int) a) / 2LL;}intbar (void){ return ((unsigned int) (signed int) a) % 5LL;}intmain (void){ int r; r = foo (); if (r != ((unsigned int) (signed int) (signed char) -4) / 2LL) abort (); r = bar (); if (r != ((unsigned int) (signed int) (signed char) -4) % 5LL) abort (); exit (0);}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?