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

📄 attr-invalid.c

📁 this is a gcc file, you can download it and learn its usetility, for further detail please look at t
💻 C
字号:
/* { dg-do compile } *//* { dg-options "" } */#define CONCAT_(A,B) A ## B#define CONCAT(A,B) CONCAT_(A,B)#define ATTR __attribute__((AT))#define ATSYM(suf) CONCAT (AT, CONCAT_ (_, suf))#define AT noinlinetypedef int ATSYM(type) ATTR; /* { dg-warning "attribute ignored" "" } */typedef int (*ATSYM(fntype))(void) ATTR; /* { dg-warning "attribute ignored" "" } */struct ATSYM(struct) {  char dummy ATTR; /* { dg-warning "attribute ignored" "" } */} ATTR; /* { dg-warning "does not apply to types" "" } */int ATSYM(var) ATTR;  /* { dg-warning "attribute ignored" "" } */int ATSYM(fn_knrarg) (arg)  int arg ATTR; /* { dg-warning "attribute ignored" "" } */{ return 0; }int ATSYM(fn_isoarg) (int arg ATTR) { return 0; } /* { dg-warning "attribute ignored" "" } */int ATSYM(fn_vars) (void) {  static int svar ATTR; /* { dg-warning "attribute ignored" "" } */  auto int lvar ATTR; /* { dg-warning "attribute ignored" "" } */  return 0;}#undef AT#define AT usedtypedef int ATSYM(type) ATTR; /* { dg-warning "attribute ignored" "" } */typedef int (*ATSYM(fntype))(void) ATTR; /* { dg-warning "attribute ignored" "" } */struct ATSYM(struct) {  char dummy ATTR; /* { dg-warning "attribute ignored" "" } */} ATTR; /* { dg-warning "does not apply to types" "" } */int ATSYM(var) ATTR;int ATSYM(fn_knrarg) (arg)  int arg ATTR; /* { dg-warning "attribute ignored" "" } */{ return 0; }int ATSYM(fn_isoarg) (int arg ATTR) { return 0; } /* { dg-warning "attribute ignored" "" } */int ATSYM(fn_vars) (void) {  static int svar ATTR;  auto int lvar ATTR; /* { dg-warning "attribute ignored" "" } */  return 0;}

⌨️ 快捷键说明

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