GCC主要数据结构之cpp_buffer

 

/* Represents the contents of a file cpplib has read in.  */ struct cpp_buffer {   const unsigned char *cur;        /* Current location.  */   const unsigned char *line_base;  /* Start of current physical line.  */   const unsigned char *next_line;  /* Start of to-be-cleaned logical line.  */

  const unsigned char *buf;        /* Entire character buffer.  */   const unsigned char *rlimit;     /* Writable byte at end of file.  */   const unsigned char *to_free;    /* Pointer that should be freed when           popping the buffer.  */

  _cpp_line_note *notes;           /* Array of notes.  */   unsigned int cur_note;           /* Next note to process.  */   unsigned int notes_used;         /* Number of notes.  */   unsigned int notes_cap;          /* Size of allocated array.  */

  struct cpp_buffer *prev;

  /* Pointer into the file table; non-NULL if this is a file buffer.      Used for include_next and to record control macros.  */   struct _cpp_file *file;

  /* Saved value of __TIMESTAMP__ macro - date and time of last modification      of the assotiated file.  */   const unsigned char *timestamp;

  /* Value of if_stack at start of this file.      Used to prohibit unmatched #endif (etc) in an include file.  */   struct if_stack *if_stack;

  /* True if we need to get the next clean line.  */   bool need_line;

  /* True if we have already warned about C++ comments in this file.      The warning happens only for C89 extended mode with -pedantic on,      or for -Wtraditional, and only once per file (otherwise it would      be far too noisy).  */   unsigned int warned_cplusplus_comments : 1;

  /* True if we don't process trigraphs and escaped newlines.  True      for preprocessed input, command line directives, and _Pragma      buffers.  */   unsigned int from_stage3 : 1;

  /* At EOF, a buffer is automatically popped.  If RETURN_AT_EOF is      true, a CPP_EOF token is then returned.  Otherwise, the next      token from the enclosing buffer is returned.  */   unsigned int return_at_eof : 1;

  /* One for a system header, two for a C system header file that therefore      needs to be extern "C" protected in C++, and zero otherwise.  */   unsigned char sysp;

  /* The directory of the this buffer's file.  Its NAME member is not      allocated, so we don't need to worry about freeing it.  */   struct cpp_dir dir;

  /* Descriptor for converting from the input character set to the      source character set.  */   struct cset_converter input_cset_desc; };

 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值