comparison libcpp/init.c @ 67:f6334be47118

update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
author nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
date Tue, 22 Mar 2011 17:18:12 +0900
parents b7f97abdc517
children 04ced10e8804
comparison
equal deleted inserted replaced
65:65488c3d617d 67:f6334be47118
154 154
155 cpp_set_lang (pfile, lang); 155 cpp_set_lang (pfile, lang);
156 CPP_OPTION (pfile, warn_multichar) = 1; 156 CPP_OPTION (pfile, warn_multichar) = 1;
157 CPP_OPTION (pfile, discard_comments) = 1; 157 CPP_OPTION (pfile, discard_comments) = 1;
158 CPP_OPTION (pfile, discard_comments_in_macro_exp) = 1; 158 CPP_OPTION (pfile, discard_comments_in_macro_exp) = 1;
159 CPP_OPTION (pfile, show_column) = 1;
160 CPP_OPTION (pfile, tabstop) = 8; 159 CPP_OPTION (pfile, tabstop) = 8;
161 CPP_OPTION (pfile, operator_names) = 1; 160 CPP_OPTION (pfile, operator_names) = 1;
162 CPP_OPTION (pfile, warn_trigraphs) = 2; 161 CPP_OPTION (pfile, warn_trigraphs) = 2;
163 CPP_OPTION (pfile, warn_endif_labels) = 1; 162 CPP_OPTION (pfile, warn_endif_labels) = 1;
164 CPP_OPTION (pfile, warn_deprecated) = 1; 163 CPP_OPTION (pfile, cpp_warn_deprecated) = 1;
165 CPP_OPTION (pfile, warn_long_long) = 0; 164 CPP_OPTION (pfile, cpp_warn_long_long) = 0;
166 CPP_OPTION (pfile, dollars_in_ident) = 1; 165 CPP_OPTION (pfile, dollars_in_ident) = 1;
167 CPP_OPTION (pfile, warn_dollars) = 1; 166 CPP_OPTION (pfile, warn_dollars) = 1;
168 CPP_OPTION (pfile, warn_variadic_macros) = 1; 167 CPP_OPTION (pfile, warn_variadic_macros) = 1;
169 CPP_OPTION (pfile, warn_builtin_macro_redefined) = 1; 168 CPP_OPTION (pfile, warn_builtin_macro_redefined) = 1;
170 CPP_OPTION (pfile, warn_normalize) = normalized_C; 169 CPP_OPTION (pfile, warn_normalize) = normalized_C;
322 321
323 There are two tables of these. builtin_array holds all the 322 There are two tables of these. builtin_array holds all the
324 "builtin" macros: these are handled by builtin_macro() in 323 "builtin" macros: these are handled by builtin_macro() in
325 macro.c. Builtin is somewhat of a misnomer -- the property of 324 macro.c. Builtin is somewhat of a misnomer -- the property of
326 interest is that these macros require special code to compute their 325 interest is that these macros require special code to compute their
327 expansions. The value is a "builtin_type" enumerator. 326 expansions. The value is a "cpp_builtin_type" enumerator.
328 327
329 operator_array holds the C++ named operators. These are keywords 328 operator_array holds the C++ named operators. These are keywords
330 which act as aliases for punctuators. In C++, they cannot be 329 which act as aliases for punctuators. In C++, they cannot be
331 altered through #define, and #if recognizes them as operators. In 330 altered through #define, and #if recognizes them as operators. In
332 C, these are not entered into the hash table at all (but see 331 C, these are not entered into the hash table at all (but see
697 static void 696 static void
698 post_options (cpp_reader *pfile) 697 post_options (cpp_reader *pfile)
699 { 698 {
700 /* -Wtraditional is not useful in C++ mode. */ 699 /* -Wtraditional is not useful in C++ mode. */
701 if (CPP_OPTION (pfile, cplusplus)) 700 if (CPP_OPTION (pfile, cplusplus))
702 CPP_OPTION (pfile, warn_traditional) = 0; 701 CPP_OPTION (pfile, cpp_warn_traditional) = 0;
703 702
704 /* Permanently disable macro expansion if we are rescanning 703 /* Permanently disable macro expansion if we are rescanning
705 preprocessed text. Read preprocesed source in ISO mode. */ 704 preprocessed text. Read preprocesed source in ISO mode. */
706 if (CPP_OPTION (pfile, preprocessed)) 705 if (CPP_OPTION (pfile, preprocessed))
707 { 706 {
715 714
716 if (CPP_OPTION (pfile, traditional)) 715 if (CPP_OPTION (pfile, traditional))
717 { 716 {
718 CPP_OPTION (pfile, cplusplus_comments) = 0; 717 CPP_OPTION (pfile, cplusplus_comments) = 0;
719 718
720 /* Traditional CPP does not accurately track column information. */
721 CPP_OPTION (pfile, show_column) = 0;
722 CPP_OPTION (pfile, trigraphs) = 0; 719 CPP_OPTION (pfile, trigraphs) = 0;
723 CPP_OPTION (pfile, warn_trigraphs) = 0; 720 CPP_OPTION (pfile, warn_trigraphs) = 0;
724 } 721 }
725 } 722 }