guard1.c
来自「用于进行gcc测试」· C语言 代码 · 共 30 行
C
30 行
// { dg-options "-fvisibility=hidden" }// { dg-require-visibility "" }// { dg-final { scan-not-hidden "_ZGVZN5otherclEvE4s_cd" } }extern "C" int printf (const char *, ...);#define DLLEXPORT __attribute__ ((visibility("default")))struct class_data{ int apple; class_data() { printf("non trivial ctor\n"); }};struct DLLEXPORT other{ class_data* operator ()() { static class_data s_cd; return &s_cd; }};int main(){ other aFoo; aFoo(); return 0;}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?