parse4.c

来自「gcc3.2.1源代码」· C语言 代码 · 共 25 行

C
25
字号
// Build don't link: // this is marked as an expected error because it evidences an// ambiguity in the grammar between expressions and declarations.// when the parser's been cleaned up or rewritten, the error// marker can go away, since it'll no longer occur.class B{public:    B( int t ) {}    void f() {}};int g() { return 0; } // gets bogus error - referenced belowint main(){    int try1;    B( try1 ).f();   // no syntax error    B b( g() );      // no syntax error    B( ::g() ).f();  // gets bogus error - treated as decl XFAIL *-*-*    B( g() ).f();    // gets bogus error - treated as decl XFAIL *-*-*}

⌨️ 快捷键说明

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