1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
namespace declrefexpr_ns{ class testClass { public: testClass() = default; int a; private: }; } // namespace int __attribute__((weak)) main(int argc, char *argv[]) { int a; int b; declrefexpr_ns::testClass tc; tc.a = 10; return a + b; }