900212_01.c

来自「gcc-you can use this code to learn somet」· C语言 代码 · 共 39 行

C
39
字号
// g++ 1.36.1 bug 900212_01// g++ fails to flag as errors all attempts to add or subtract integer values// from pointers-to-member values.// Some cases are detected however.// Cfront 2.0 passes this test.// keywords: pointer arithmetic, member pointersstruct struct0 {};int struct0::*p0;int struct0::*p1;int (struct0::*fp0) ();int (struct0::*fp1) ();void global_function_0 (){  p0 = p1 + 3;			// ERROR -   p0 = p1 - 3;			// ERROR -   p1++;				/* ERROR - caught by g++ */  ++p1;				/* ERROR - caught by g++ */  p1--;				/* ERROR - caught by g++ */  --p1;				/* ERROR - caught by g++ */  fp0 = fp1 + 3;		// ERROR -   fp0 = fp1 - 3;		// ERROR -   fp1++;			/* ERROR - */  ++fp1;			/* ERROR - */  fp1--;			/* ERROR - */  --fp1;			/* ERROR - */}int main () { return 0; }

⌨️ 快捷键说明

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