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

📄 uninit-6.c

📁 this is a gcc file, you can download it and learn its usetility, for further detail please look at t
💻 C
字号:
/* Spurious uninitialized variable warnings.   This one inspired by java/class.c:build_utf8_ref.  *//* { dg-do compile } *//* { dg-options "-O -Wuninitialized" } */#include <stddef.h>struct tree{    struct tree *car;    struct tree *cdr;    int type, data;};extern void *malloc(size_t);#define INTEGER_T 1#define PTR_T	  2#define APPEND(TREE, LAST, TYPE, VALUE)				\do {								\     struct tree *tmp = malloc (sizeof (struct tree));		\     tmp->car = 0; tmp->cdr = 0; tmp->type = TYPE;		\     tmp->data = VALUE;						\     if (TREE->car)						\	 LAST->cdr = tmp;					\     else							\	 TREE->car = tmp;					\     LAST = tmp;						\} while(0) struct tree *make_something(int a, int b, int c){    struct tree *rv;    struct tree *field;  /* { dg-bogus "field" "uninitialized variable warning" { xfail *-*-* } } */    rv = malloc (sizeof (struct tree));    rv->car = 0;    APPEND(rv, field, INTEGER_T, a);    APPEND(rv, field, PTR_T, b);    APPEND(rv, field, INTEGER_T, c);    return rv;}

⌨️ 快捷键说明

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