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

📄 declspec-8.c

📁 linux下编程用 编译软件
💻 C
字号:
/* Test declaration specifiers.  Test checks on storage class   specifiers and function specifiers in empty declarations.  *//* Origin: Joseph Myers <jsm@polyomino.org.uk> *//* { dg-do compile } *//* { dg-options "" } *//* The constraints on storage class specifiers and function specifiers   must be met for empty declarations where they are useless.  Thus   there may be only one storage class specifier (C90 6.5.1, C99   6.7.1#2) and "inline" must not be used because the declaration is   not that of an identifier for a function (C99 6.7.4#1), and   "register" and "auto" must not be used at file scope (C90 6.7, C99   6.9#2).  */static static struct s; /* { dg-error "error: duplicate 'static'" } *//* { dg-warning "warning: useless storage class specifier in empty declaration" "static static" { target *-*-* } 15 } */static extern struct t; /* { dg-error "error: multiple storage classes in declaration specifiers" } *//* { dg-warning "warning: useless storage class specifier in empty declaration" "static extern" { target *-*-* } 18 } */inline union u; /* { dg-error "error: 'inline' in empty declaration" } */auto struct v; /* { dg-error "error: 'auto' in file-scope empty declaration" } */register struct w; /* { dg-error "error: 'register' in file-scope empty declaration" } */voidf (void){  auto union p; /* { dg-warning "warning: useless storage class specifier in empty declaration" } */  register struct q; /* { dg-warning "warning: useless storage class specifier in empty declaration" } */}

⌨️ 快捷键说明

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