GCC主要数据结构之cpp_options

 

/* This structure is nested inside struct cpp_reader, and    carries all the options visible to the command line.  */ struct cpp_options {   /* Characters between tab stops.  */   unsigned int tabstop;

  /* The language we're preprocessing.  */   enum c_lang lang;

  /* Nonzero means use extra default include directories for C++.  */   unsigned char cplusplus;

  /* Nonzero means handle cplusplus style comments.  */   unsigned char cplusplus_comments;

  /* Nonzero means define __OBJC__, treat @ as a special token, use      the OBJC[PLUS]_INCLUDE_PATH environment variable, and allow      "#import".  */   unsigned char objc;

  /* Nonzero means don't copy comments into the output file.  */   unsigned char discard_comments;

  /* Nonzero means don't copy comments into the output file during      macro expansion.  */   unsigned char discard_comments_in_macro_exp;

  /* Nonzero means process the ISO trigraph sequences.  */   unsigned char trigraphs;

  /* Nonzero means process the ISO digraph sequences.  */   unsigned char digraphs;

  /* Nonzero means to allow hexadecimal floats and LL suffixes.  */   unsigned char extended_numbers;

  /* Nonzero means process u/U prefix literals (UTF-16/32).  */   unsigned char uliterals;

  /* Nonzero means process u8 prefixed character literals (UTF-8).  */   unsigned char utf8_char_literals;

  /* Nonzero means process r/R raw strings.  If this is set, uliterals      must be set as well.  */   unsigned char rliterals;

  /* Nonzero means print names of header files (-H).  */   unsigned char print_include_names;

  /* Nonzero means complain about deprecated features.  */   unsigned char cpp_warn_deprecated;

  /* Nonzero means warn if slash-star appears in a comment.  */   unsigned char warn_comments;

  /* Nonzero means to warn about __DATA__, __TIME__ and __TIMESTAMP__ usage.   */   unsigned char warn_date_time;

  /* Nonzero means warn if a user-supplied include directory does not      exist.  */   unsigned char warn_missing_include_dirs;

  /* Nonzero means warn if there are any trigraphs.  */   unsigned char warn_trigraphs;

  /* Nonzero means warn about multicharacter charconsts.  */   unsigned char warn_multichar;

  /* Nonzero means warn about various incompatibilities with      traditional C.  */   unsigned char cpp_warn_traditional;

  /* Nonzero means warn about long long numeric constants.  */   unsigned char cpp_warn_long_long;

  /* Nonzero means warn about text after an #endif (or #else).  */   unsigned char warn_endif_labels;

  /* Nonzero means warn about implicit sign changes owing to integer      promotions.  */   unsigned char warn_num_sign_change;

  /* Zero means don't warn about __VA_ARGS__ usage in c89 pedantic mode.      Presumably the usage is protected by the appropriate #ifdef.  */   unsigned char warn_variadic_macros;

  /* Nonzero means warn about builtin macros that are redefined or      explicitly undefined.  */   unsigned char warn_builtin_macro_redefined;

  /* Nonzero means we should look for header.gcc files that remap file      names.  */   unsigned char remap;

  /* Zero means dollar signs are punctuation.  */   unsigned char dollars_in_ident;

  /* Nonzero means UCNs are accepted in identifiers.  */   unsigned char extended_identifiers;

  /* True if we should warn about dollars in identifiers or numbers      for this translation unit.  */   unsigned char warn_dollars;

  /* Nonzero means warn if undefined identifiers are evaluated in an #if.  */   unsigned char warn_undef;

  /* Nonzero means warn of unused macros from the main file.  */   unsigned char warn_unused_macros;

  /* Nonzero for the 1999 C Standard, including corrigenda and amendments.  */   unsigned char c99;

  /* Nonzero if we are conforming to a specific C or C++ standard.  */   unsigned char std;

  /* Nonzero means give all the error messages the ANSI standard requires.  */   unsigned char cpp_pedantic;

  /* Nonzero means we're looking at already preprocessed code, so don't      bother trying to do macro expansion and whatnot.  */   unsigned char preprocessed;     /* Nonzero means we are going to emit debugging logs during      preprocessing.  */   unsigned char debug;

  /* Nonzero means we are tracking locations of tokens involved in      macro expansion. 1 Means we track the location in degraded mode      where we do not track locations of tokens resulting from the      expansion of arguments of function-like macro.  2 Means we do      track all macro expansions. This last option is the one that      consumes the highest amount of memory.  */   unsigned char track_macro_expansion;

  /* Nonzero means handle C++ alternate operator names.  */   unsigned char operator_names;

  /* Nonzero means warn about use of C++ alternate operator names.  */   unsigned char warn_cxx_operator_names;

  /* True for traditional preprocessing.  */   unsigned char traditional;

  /* Nonzero for C++ 2011 Standard user-defined literals.  */   unsigned char user_literals;

  /* Nonzero means warn when a string or character literal is followed by a      ud-suffix which does not beging with an underscore.  */   unsigned char warn_literal_suffix;

  /* Nonzero means interpret imaginary, fixed-point, or other gnu extension      literal number suffixes as user-defined literal number suffixes.  */   unsigned char ext_numeric_literals;

  /* Nonzero means extended identifiers allow the characters specified      in C11 and C++11.  */   unsigned char c11_identifiers;

  /* Nonzero for C++ 2014 Standard binary constants.  */   unsigned char binary_constants;

  /* Nonzero for C++ 2014 Standard digit separators.  */   unsigned char digit_separators;

  /* Holds the name of the target (execution) character set.  */   const char *narrow_charset;

  /* Holds the name of the target wide character set.  */   const char *wide_charset;

  /* Holds the name of the input character set.  */   const char *input_charset;

  /* The minimum permitted level of normalization before a warning      is generated.  See enum cpp_normalize_level.  */   int warn_normalize;

  /* True to warn about precompiled header files we couldn't use.  */   bool warn_invalid_pch;

  /* True if dependencies should be restored from a precompiled header.  */   bool restore_pch_deps;

  /* True if warn about differences between C90 and C99.  */   signed char cpp_warn_c90_c99_compat;

  /* True if warn about differences between C++98 and C++11.  */   bool cpp_warn_cxx11_compat;

  /* Dependency generation.  */   struct   {     /* Style of header dependencies to generate.  */     enum cpp_deps_style style;

    /* Assume missing files are generated files.  */     bool missing_files;

    /* Generate phony targets for each dependency apart from the first        one.  */     bool phony_targets;

    /* If true, no dependency is generated on the main file.  */     bool ignore_main_file;

    /* If true, intend to use the preprocessor output (e.g., for compilation)        in addition to the dependency info.  */     bool need_preprocessor_output;   } deps;

  /* Target-specific features set by the front end or client.  */

  /* Precision for target CPP arithmetic, target characters, target      ints and target wide characters, respectively.  */   size_t precision, char_precision, int_precision, wchar_precision;

  /* True means chars (wide chars) are unsigned.  */   bool unsigned_char, unsigned_wchar;

  /* True if the most significant byte in a word has the lowest      address in memory.  */   bool bytes_big_endian;

  /* Nonzero means __STDC__ should have the value 0 in system headers.  */   unsigned char stdc_0_in_system_headers;

  /* True disables tokenization outside of preprocessing directives. */   bool directives_only;

  /* True enables canonicalization of system header file paths. */   bool canonical_system_headers; };

 
 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值