⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 900428_03.c

📁 gcc-you can use this code to learn something about gcc, and inquire further into linux,
💻 C
字号:
// g++ 1.37.1 bug 900428_03// g++ fails to detect cases where a constructor for a derived class invokes// (either explicitly or implicitly) a private constructor for a base class.// cfront 2.0 passes this test.// keywords: inheritance, private, accessability, constructorsstruct struct_0 {  int struct_0_data_member;private:  struct_0 (int, int);public:  struct_0 (int);};struct_0::struct_0 (int i) { }struct_0::struct_0 (int, int) { } // ERROR - xref from belowstruct struct_1 : public struct_0 {  struct_1 ();};struct_1::struct_1 () : struct_0 (8,9){				// ERROR - }struct struct_2 {  struct_0 struct_2_data_member;  struct_2 ();};// g++ catches the following error (but does so only at the line with the // closing curly brace).struct_2::struct_2 () : struct_2_data_member (8,9){				// ERROR - should be up one line}int main () { return 0; }

⌨️ 快捷键说明

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