comparison libcpp/include/cpplib.h @ 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
1 /* Definitions for CPP library. 1 /* Definitions for CPP library.
2 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
3 2004, 2005, 2007, 2008, 2009 3 2004, 2005, 2007, 2008, 2009, 2010
4 Free Software Foundation, Inc. 4 Free Software Foundation, Inc.
5 Written by Per Bothner, 1994-95. 5 Written by Per Bothner, 1994-95.
6 6
7 This program is free software; you can redistribute it and/or modify it 7 This program is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License as published by the 8 under the terms of the GNU General Public License as published by the
317 317
318 /* Nonzero means print names of header files (-H). */ 318 /* Nonzero means print names of header files (-H). */
319 unsigned char print_include_names; 319 unsigned char print_include_names;
320 320
321 /* Nonzero means complain about deprecated features. */ 321 /* Nonzero means complain about deprecated features. */
322 unsigned char warn_deprecated; 322 unsigned char cpp_warn_deprecated;
323 323
324 /* Nonzero means warn if slash-star appears in a comment. */ 324 /* Nonzero means warn if slash-star appears in a comment. */
325 unsigned char warn_comments; 325 unsigned char warn_comments;
326 326
327 /* Nonzero means warn if a user-supplied include directory does not 327 /* Nonzero means warn if a user-supplied include directory does not
334 /* Nonzero means warn about multicharacter charconsts. */ 334 /* Nonzero means warn about multicharacter charconsts. */
335 unsigned char warn_multichar; 335 unsigned char warn_multichar;
336 336
337 /* Nonzero means warn about various incompatibilities with 337 /* Nonzero means warn about various incompatibilities with
338 traditional C. */ 338 traditional C. */
339 unsigned char warn_traditional; 339 unsigned char cpp_warn_traditional;
340 340
341 /* Nonzero means warn about long long numeric constants. */ 341 /* Nonzero means warn about long long numeric constants. */
342 unsigned char warn_long_long; 342 unsigned char cpp_warn_long_long;
343 343
344 /* Nonzero means warn about text after an #endif (or #else). */ 344 /* Nonzero means warn about text after an #endif (or #else). */
345 unsigned char warn_endif_labels; 345 unsigned char warn_endif_labels;
346 346
347 /* Nonzero means warn about implicit sign changes owing to integer 347 /* Nonzero means warn about implicit sign changes owing to integer
381 381
382 /* Nonzero if we are conforming to a specific C or C++ standard. */ 382 /* Nonzero if we are conforming to a specific C or C++ standard. */
383 unsigned char std; 383 unsigned char std;
384 384
385 /* Nonzero means give all the error messages the ANSI standard requires. */ 385 /* Nonzero means give all the error messages the ANSI standard requires. */
386 unsigned char pedantic; 386 unsigned char cpp_pedantic;
387 387
388 /* Nonzero means we're looking at already preprocessed code, so don't 388 /* Nonzero means we're looking at already preprocessed code, so don't
389 bother trying to do macro expansion and whatnot. */ 389 bother trying to do macro expansion and whatnot. */
390 unsigned char preprocessed; 390 unsigned char preprocessed;
391
392 /* Print column number in error messages. */
393 unsigned char show_column;
394 391
395 /* Nonzero means handle C++ alternate operator names. */ 392 /* Nonzero means handle C++ alternate operator names. */
396 unsigned char operator_names; 393 unsigned char operator_names;
397 394
398 /* Nonzero means warn about use of C++ alternate operator names. */ 395 /* Nonzero means warn about use of C++ alternate operator names. */
510 changes are processed. */ 507 changes are processed. */
511 void (*before_define) (cpp_reader *); 508 void (*before_define) (cpp_reader *);
512 /* Called whenever a macro is expanded or tested. 509 /* Called whenever a macro is expanded or tested.
513 Second argument is the location of the start of the current expansion. */ 510 Second argument is the location of the start of the current expansion. */
514 void (*used) (cpp_reader *, source_location, cpp_hashnode *); 511 void (*used) (cpp_reader *, source_location, cpp_hashnode *);
512
513 /* Callback that can change a user builtin into normal macro. */
514 bool (*user_builtin_macro) (cpp_reader *, cpp_hashnode *);
515 }; 515 };
516 516
517 #ifdef VMS 517 #ifdef VMS
518 #define INO_T_CPP ino_t ino[3] 518 #define INO_T_CPP ino_t ino[3]
519 #else 519 #else
600 BT_INCLUDE_LEVEL, /* `__INCLUDE_LEVEL__' */ 600 BT_INCLUDE_LEVEL, /* `__INCLUDE_LEVEL__' */
601 BT_TIME, /* `__TIME__' */ 601 BT_TIME, /* `__TIME__' */
602 BT_STDC, /* `__STDC__' */ 602 BT_STDC, /* `__STDC__' */
603 BT_PRAGMA, /* `_Pragma' operator */ 603 BT_PRAGMA, /* `_Pragma' operator */
604 BT_TIMESTAMP, /* `__TIMESTAMP__' */ 604 BT_TIMESTAMP, /* `__TIMESTAMP__' */
605 BT_COUNTER /* `__COUNTER__' */ 605 BT_COUNTER, /* `__COUNTER__' */
606 BT_FIRST_USER, /* User defined builtin macros. */
607 BT_LAST_USER = BT_FIRST_USER + 31
606 }; 608 };
607 609
608 #define CPP_HASHNODE(HNODE) ((cpp_hashnode *) (HNODE)) 610 #define CPP_HASHNODE(HNODE) ((cpp_hashnode *) (HNODE))
609 #define HT_NODE(NODE) ((ht_identifier *) (NODE)) 611 #define HT_NODE(NODE) ((ht_identifier *) (NODE))
610 #define NODE_LEN(NODE) HT_LEN (&(NODE)->ident) 612 #define NODE_LEN(NODE) HT_LEN (&(NODE)->ident)
727 const cpp_token *); 729 const cpp_token *);
728 extern const cpp_token *cpp_get_token (cpp_reader *); 730 extern const cpp_token *cpp_get_token (cpp_reader *);
729 extern const cpp_token *cpp_get_token_with_location (cpp_reader *, 731 extern const cpp_token *cpp_get_token_with_location (cpp_reader *,
730 source_location *); 732 source_location *);
731 extern const unsigned char *cpp_macro_definition (cpp_reader *, 733 extern const unsigned char *cpp_macro_definition (cpp_reader *,
732 const cpp_hashnode *); 734 cpp_hashnode *);
733 extern void _cpp_backup_tokens (cpp_reader *, unsigned int); 735 extern void _cpp_backup_tokens (cpp_reader *, unsigned int);
734 extern const cpp_token *cpp_peek_token (cpp_reader *, int); 736 extern const cpp_token *cpp_peek_token (cpp_reader *, int);
735 737
736 /* Evaluate a CPP_*CHAR* token. */ 738 /* Evaluate a CPP_*CHAR* token. */
737 extern cppchar_t cpp_interpret_charconst (cpp_reader *, const cpp_token *, 739 extern cppchar_t cpp_interpret_charconst (cpp_reader *, const cpp_token *,
753 extern void cpp_define_formatted (cpp_reader *pfile, 755 extern void cpp_define_formatted (cpp_reader *pfile,
754 const char *fmt, ...) ATTRIBUTE_PRINTF_2; 756 const char *fmt, ...) ATTRIBUTE_PRINTF_2;
755 extern void cpp_assert (cpp_reader *, const char *); 757 extern void cpp_assert (cpp_reader *, const char *);
756 extern void cpp_undef (cpp_reader *, const char *); 758 extern void cpp_undef (cpp_reader *, const char *);
757 extern void cpp_unassert (cpp_reader *, const char *); 759 extern void cpp_unassert (cpp_reader *, const char *);
758
759 extern cpp_macro *cpp_push_definition (cpp_reader *, const char *);
760 extern void cpp_pop_definition (cpp_reader *, const char *, cpp_macro *);
761 760
762 /* Undefine all macros and assertions. */ 761 /* Undefine all macros and assertions. */
763 extern void cpp_undef_all (cpp_reader *); 762 extern void cpp_undef_all (cpp_reader *);
764 763
765 extern cpp_buffer *cpp_push_buffer (cpp_reader *, const unsigned char *, 764 extern cpp_buffer *cpp_push_buffer (cpp_reader *, const unsigned char *,