]> gcc.gnu.org Git - gcc.git/blob - gcc/cpplib.h
cpplex.c (parse_string2): Update comment.
[gcc.git] / gcc / cpplib.h
1 /* Definitions for CPP library.
2 Copyright (C) 1995, 96-99, 2000 Free Software Foundation, Inc.
3 Written by Per Bothner, 1994-95.
4
5 This program is free software; you can redistribute it and/or modify it
6 under the terms of the GNU General Public License as published by the
7 Free Software Foundation; either version 2, or (at your option) any
8 later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18
19 In other words, you are welcome to use, share and improve this program.
20 You are forbidden to forbid anyone else to use, share and improve
21 what you give them. Help stamp out software-hoarding! */
22 #ifndef __GCC_CPPLIB__
23 #define __GCC_CPPLIB__
24
25 #include <sys/types.h>
26
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30
31 typedef struct cpp_reader cpp_reader;
32 typedef struct cpp_buffer cpp_buffer;
33 typedef struct cpp_options cpp_options;
34 typedef struct cpp_printer cpp_printer;
35 typedef struct cpp_token cpp_token;
36 typedef struct cpp_toklist cpp_toklist;
37 typedef struct cpp_name cpp_name;
38
39 /* The first two groups, apart from '=', can appear in preprocessor
40 expressions. This allows a lookup table to be implemented in
41 _cpp_parse_expr.
42
43 The first group, to CPP_LAST_EQ, can be immediately followed by an
44 '='. The lexer needs operators ending in '=', like ">>=", to be in
45 the same order as their counterparts without the '=', like ">>". */
46
47 /* Positions in the table. */
48 #define CPP_LAST_EQ CPP_LSHIFT
49 #define CPP_FIRST_DIGRAPH CPP_HASH
50
51 #define TTYPE_TABLE \
52 T(CPP_EQ = 0, "=") \
53 T(CPP_NOT, "!") \
54 T(CPP_GREATER, ">") /* compare */ \
55 T(CPP_LESS, "<") \
56 T(CPP_PLUS, "+") /* math */ \
57 T(CPP_MINUS, "-") \
58 T(CPP_MULT, "*") \
59 T(CPP_DIV, "/") \
60 T(CPP_MOD, "%") \
61 T(CPP_AND, "&") /* bit ops */ \
62 T(CPP_OR, "|") \
63 T(CPP_XOR, "^") \
64 T(CPP_RSHIFT, ">>") \
65 T(CPP_LSHIFT, "<<") \
66 \
67 T(CPP_COMPL, "~") \
68 T(CPP_AND_AND, "&&") /* logical */ \
69 T(CPP_OR_OR, "||") \
70 T(CPP_QUERY, "?") \
71 T(CPP_COLON, ":") \
72 T(CPP_COMMA, ",") /* grouping */ \
73 T(CPP_OPEN_PAREN, "(") \
74 T(CPP_CLOSE_PAREN, ")") \
75 T(CPP_EQ_EQ, "==") /* compare */ \
76 T(CPP_NOT_EQ, "!=") \
77 T(CPP_GREATER_EQ, ">=") \
78 T(CPP_LESS_EQ, "<=") \
79 \
80 T(CPP_PLUS_EQ, "+=") /* math */ \
81 T(CPP_MINUS_EQ, "-=") \
82 T(CPP_MULT_EQ, "*=") \
83 T(CPP_DIV_EQ, "/=") \
84 T(CPP_MOD_EQ, "%=") \
85 T(CPP_AND_EQ, "&=") /* bit ops */ \
86 T(CPP_OR_EQ, "|=") \
87 T(CPP_XOR_EQ, "^=") \
88 T(CPP_RSHIFT_EQ, ">>=") \
89 T(CPP_LSHIFT_EQ, "<<=") \
90 /* Digraphs together, beginning with CPP_FIRST_DIGRAPH. */ \
91 T(CPP_HASH, "#") /* digraphs */ \
92 T(CPP_PASTE, "##") \
93 T(CPP_OPEN_SQUARE, "[") \
94 T(CPP_CLOSE_SQUARE, "]") \
95 T(CPP_OPEN_BRACE, "{") \
96 T(CPP_CLOSE_BRACE, "}") \
97 /* The remainder of the punctuation. Order is not significant. */ \
98 T(CPP_SEMICOLON, ";") /* structure */ \
99 T(CPP_ELLIPSIS, "...") \
100 T(CPP_BACKSLASH, "\\") \
101 T(CPP_PLUS_PLUS, "++") /* increment */ \
102 T(CPP_MINUS_MINUS, "--") \
103 T(CPP_DEREF, "->") /* accessors */ \
104 T(CPP_DOT, ".") \
105 T(CPP_SCOPE, "::") \
106 T(CPP_DEREF_STAR, "->*") \
107 T(CPP_DOT_STAR, ".*") \
108 T(CPP_MIN, "<?") /* extension */ \
109 T(CPP_MAX, ">?") \
110 C(CPP_OTHER, 0) /* stray punctuation */ \
111 \
112 I(CPP_NAME, 0) /* word */ \
113 I(CPP_INT, 0) /* 23 */ \
114 I(CPP_FLOAT, 0) /* 3.14159 */ \
115 I(CPP_NUMBER, 0) /* 34_be+ta */ \
116 S(CPP_CHAR, 0) /* 'char' */ \
117 S(CPP_WCHAR, 0) /* L'char' */ \
118 S(CPP_STRING, 0) /* "string" */ \
119 S(CPP_WSTRING, 0) /* L"string" */ \
120 \
121 I(CPP_COMMENT, 0) /* Only if output comments. */ \
122 N(CPP_MACRO_ARG, 0) /* Macro argument. */ \
123 N(CPP_SUBLIST, 0) /* Sublist. */ \
124 T(CPP_VSPACE, "\n") /* End of line. */ \
125 N(CPP_EOF, 0) /* End of file. */ \
126 N(CPP_HEADER_NAME, 0) /* <stdio.h> in #include */ \
127 N(CPP_ASSERTION, 0) /* (...) in #assert */ \
128 \
129 /* Obsolete - will be removed when no code uses them still. */ \
130 N(CPP_HSPACE, 0) /* Horizontal white space. */ \
131 N(CPP_DIRECTIVE, 0) /* #define and the like */ \
132 N(CPP_MACRO, 0) /* Like a NAME, but expanded. */
133
134 #define T(e, s) e,
135 #define I(e, s) e,
136 #define S(e, s) e,
137 #define C(e, s) e,
138 #define N(e, s) e,
139 enum cpp_ttype
140 {
141 TTYPE_TABLE
142 N_TTYPES
143 };
144 #undef T
145 #undef I
146 #undef S
147 #undef C
148 #undef N
149
150 /* Payload of a NAME, NUMBER, FLOAT, STRING, or COMMENT token. */
151 struct cpp_name
152 {
153 unsigned int len;
154 const unsigned char *text;
155 };
156
157 /* Accessor macros for token lists - all expect you have a
158 list and an index. */
159
160 #define TOK_TYPE(l_, i_) ((l_)->tokens[i_].type)
161 #define TOK_FLAGS(l_, i_) ((l_)->tokens[i_].flags)
162 #define TOK_AUX(l_, i_) ((l_)->tokens[i_].aux)
163 #define TOK_COL(l_, i_) ((l_)->tokens[i_].col)
164 #define TOK_INT(l_, i_) ((l_)->tokens[i_].val.integer)
165 #define TOK_NAME(l_, i_) ((l_)->tokens[i_].val.name.text)
166 #define TOK_LEN(l_, i_) ((l_)->tokens[i_].val.name.len)
167
168 #define TOK_PREV_WHITE(l_, i_) (TOK_FLAGS(l_, i_) & PREV_WHITESPACE)
169
170 /* Flags for the cpp_token structure. */
171 #define PREV_WHITESPACE 1 /* If whitespace before this token. */
172 #define DIGRAPH 2 /* If it was a digraph. */
173 #define UNSIGNED_INT 4 /* If int preprocessing token unsigned. */
174
175 /* A preprocessing token. This has been carefully packed and should
176 occupy 16 bytes on both 32- and 64-bit hosts. */
177 struct cpp_token
178 {
179 unsigned short col; /* starting column of this token */
180 ENUM_BITFIELD(cpp_ttype) type : CHAR_BIT; /* node type */
181 unsigned char flags; /* flags - see above */
182 unsigned int aux; /* CPP_OTHER character. Hash of a
183 NAME, or something - see uses
184 in the code */
185 union
186 {
187 struct cpp_name name; /* a string */
188 HOST_WIDEST_INT integer; /* an integer */
189 } val;
190 };
191
192 /* Directive flags. */
193 #define SYNTAX_INCLUDE (1 << 8)
194
195 typedef int (*directive_handler) PARAMS ((cpp_reader *));
196
197 struct cpp_toklist
198 {
199 cpp_token *tokens; /* actual tokens as an array */
200 unsigned int tokens_used; /* tokens used */
201 unsigned int tokens_cap; /* tokens allocated */
202
203 unsigned char *namebuf; /* names buffer */
204 unsigned int name_used; /* _bytes_ used */
205 unsigned int name_cap; /* _bytes_ allocated */
206
207 unsigned int line; /* starting line number */
208
209 /* Comment copying. */
210 cpp_token *comments; /* comment tokens. */
211 unsigned int comments_used; /* comment tokens used. */
212 unsigned int comments_cap; /* comment token capacity. */
213
214 /* Only used if tokens[0].type == CPP_DIRECTIVE. This is the
215 handler to call after lexing the rest of this line. The flags
216 indicate whether the rest of the line gets special treatment
217 during lexing (#include, #if, #assert, #unassert). */
218 directive_handler dir_handler;
219 unsigned short dir_flags;
220 };
221
222 struct cpp_buffer
223 {
224 const unsigned char *cur; /* current position */
225 const unsigned char *rlimit; /* end of valid data */
226 const unsigned char *buf; /* entire buffer */
227 const unsigned char *line_base; /* start of current line */
228 const unsigned char *mark; /* Saved position for lengthy backtrack. */
229
230 struct cpp_buffer *prev;
231
232 /* Filename specified with #line command. */
233 const char *nominal_fname;
234 /* Actual directory of this file, used only for "" includes */
235 struct file_name_list *actual_dir;
236
237 /* Pointer into the include hash table. Used for include_next and
238 to record control macros. */
239 struct ihash *ihash;
240
241 /* If the buffer is the expansion of a macro, this points to the
242 macro's hash table entry. */
243 struct hashnode *macro;
244
245 /* Value of if_stack at start of this file.
246 Used to prohibit unmatched #endif (etc) in an include file. */
247 struct if_stack *if_stack;
248
249 /* Line number at line_base (above). */
250 unsigned int lineno;
251
252 /* True if this is a header file included using <FILENAME>. */
253 char system_header_p;
254
255 /* True if buffer contains escape sequences.
256 Currently there are two kinds:
257 "\r-" means following identifier should not be macro-expanded.
258 "\r " means a token-separator. This turns into " " in final output
259 if not stringizing and needed to separate tokens; otherwise nothing.
260 Any other two-character sequence beginning with \r is an error.
261
262 If this is NOT set, then \r is a one-character escape meaning backslash
263 newline. This is guaranteed not to occur in the middle of a token.
264 The two interpretations of \r do not conflict, because the two-character
265 escapes are used only in macro buffers, and backslash-newline is removed
266 from macro expansion text in collect_expansion and/or macarg. */
267 char has_escapes;
268
269 /* True if we have already warned about C++ comments in this file.
270 The warning happens only for C89 extended mode with -pedantic on,
271 or for -Wtraditional, and only once per file (otherwise it would
272 be far too noisy). */
273 char warned_cplusplus_comments;
274
275 /* In a file buffer, true if this buffer's data is mmapped
276 (currently never the case). In a macro buffer, true if this
277 buffer's data must be freed. */
278 char mapped;
279 };
280
281 struct file_name_map_list;
282 struct htab;
283
284 /* Maximum nesting of cpp_buffers. We use a static limit, partly for
285 efficiency, and partly to limit runaway recursion. */
286 #define CPP_STACK_MAX 200
287
288 /* Values for opts.dump_macros.
289 dump_only means inhibit output of the preprocessed text
290 and instead output the definitions of all user-defined
291 macros in a form suitable for use as input to cpp.
292 dump_names means pass #define and the macro name through to output.
293 dump_definitions means pass the whole definition (plus #define) through
294 */
295 enum { dump_none = 0, dump_only, dump_names, dump_definitions };
296
297 /* This structure is nested inside struct cpp_reader, and
298 carries all the options visible to the command line. */
299 struct cpp_options
300 {
301 /* Name of input and output files. */
302 const char *in_fname;
303 const char *out_fname;
304
305 /* Pending options - -D, -U, -A, -I, -ixxx. */
306 struct cpp_pending *pending;
307
308 /* File name which deps are being written to. This is 0 if deps are
309 being written to stdout. */
310 const char *deps_file;
311
312 /* Target-name to write with the dependency information. */
313 char *deps_target;
314
315 /* Search paths for include files. */
316 struct file_name_list *quote_include; /* First dir to search for "file" */
317 struct file_name_list *bracket_include;/* First dir to search for <file> */
318
319 /* Map between header names and file names, used only on DOS where
320 file names are limited in length. */
321 struct file_name_map_list *map_list;
322
323 /* Directory prefix that should replace `/usr/lib/gcc-lib/TARGET/VERSION'
324 in the standard include file directories. */
325 const char *include_prefix;
326 unsigned int include_prefix_len;
327
328 /* Non-0 means -v, so print the full set of include dirs. */
329 unsigned char verbose;
330
331 /* Nonzero means use extra default include directories for C++. */
332 unsigned char cplusplus;
333
334 /* Nonzero means handle cplusplus style comments */
335 unsigned char cplusplus_comments;
336
337 /* Nonzero means handle #import, for objective C. */
338 unsigned char objc;
339
340 /* Nonzero means this is an assembly file, so ignore unrecognized
341 directives and the "# 33" form of #line, both of which are
342 probably comments. Also, permit unbalanced ' strings (again,
343 likely to be in comments). */
344 unsigned char lang_asm;
345
346 /* Nonzero means this is Fortran, and we don't know where the
347 comments are, so permit unbalanced ' strings. Unlike lang_asm,
348 this does not ignore unrecognized directives. */
349 unsigned char lang_fortran;
350
351 /* Nonzero means handle CHILL comment syntax and output CHILL string
352 delimiters for __DATE__ etc. */
353 unsigned char chill;
354
355 /* Nonzero means don't copy comments into the output file. */
356 unsigned char discard_comments;
357
358 /* Nonzero means process the ANSI trigraph sequences. */
359 unsigned char trigraphs;
360
361 /* Nonzero means print the names of included files rather than the
362 preprocessed output. 1 means just the #include "...", 2 means
363 #include <...> as well. */
364 unsigned char print_deps;
365
366 /* Nonzero if missing .h files in -M output are assumed to be
367 generated files and not errors. */
368 unsigned char print_deps_missing_files;
369
370 /* If true, fopen (deps_file, "a") else fopen (deps_file, "w"). */
371 unsigned char print_deps_append;
372
373 /* Nonzero means print names of header files (-H). */
374 unsigned char print_include_names;
375
376 /* Nonzero means cpp_pedwarn causes a hard error. */
377 unsigned char pedantic_errors;
378
379 /* Nonzero means don't print warning messages. */
380 unsigned char inhibit_warnings;
381
382 /* Nonzero means don't print error messages. Has no option to
383 select it, but can be set by a user of cpplib (e.g. fix-header). */
384 unsigned char inhibit_errors;
385
386 /* Nonzero means warn if slash-star appears in a comment. */
387 unsigned char warn_comments;
388
389 /* Nonzero means warn if there are any trigraphs. */
390 unsigned char warn_trigraphs;
391
392 /* Nonzero means warn if #import is used. */
393 unsigned char warn_import;
394
395 /* Nonzero means warn if a macro argument is (or would be)
396 stringified with -traditional, and warn about directives
397 with the # indented from the beginning of the line. */
398 unsigned char warn_traditional;
399
400 /* Nonzero means turn warnings into errors. */
401 unsigned char warnings_are_errors;
402
403 /* Nonzero causes output not to be done, but directives such as
404 #define that have side effects are still obeyed. */
405 unsigned char no_output;
406
407 /* Nonzero means we should look for header.gcc files that remap file
408 names. */
409 unsigned char remap;
410
411 /* Nonzero means don't output line number information. */
412 unsigned char no_line_commands;
413
414 /* Nonzero means -I- has been seen, so don't look for #include "foo"
415 the source-file directory. */
416 unsigned char ignore_srcdir;
417
418 /* Zero means dollar signs are punctuation. */
419 unsigned char dollars_in_ident;
420
421 /* Nonzero means try to imitate old fashioned non-ANSI preprocessor. */
422 unsigned char traditional;
423
424 /* Nonzero means warn if undefined identifiers are evaluated in an #if. */
425 unsigned char warn_undef;
426
427 /* Nonzero for the 1989 C Standard, including corrigenda and amendments. */
428 unsigned char c89;
429
430 /* Nonzero for the 1999 C Standard, including corrigenda and amendments. */
431 unsigned char c99;
432
433 /* Nonzero means give all the error messages the ANSI standard requires. */
434 unsigned char pedantic;
435
436 /* Nonzero means we're looking at already preprocessed code, so don't
437 bother trying to do macro expansion and whatnot. */
438 unsigned char preprocessed;
439
440 /* Nonzero disables all the standard directories for headers. */
441 unsigned char no_standard_includes;
442
443 /* Nonzero disables the C++-specific standard directories for headers. */
444 unsigned char no_standard_cplusplus_includes;
445
446 /* Nonzero means dump macros in some fashion - see above. */
447 unsigned char dump_macros;
448
449 /* Nonzero means pass all #define and #undef directives which we
450 actually process through to the output stream. This feature is
451 used primarily to allow cc1 to record the #defines and #undefs
452 for the sake of debuggers which understand about preprocessor
453 macros, but it may also be useful with -E to figure out how
454 symbols are defined, and where they are defined. */
455 unsigned char debug_output;
456
457 /* Nonzero means pass #include lines through to the output. */
458 unsigned char dump_includes;
459
460 /* Print column number in error messages. */
461 unsigned char show_column;
462 };
463
464
465 /* A cpp_reader encapsulates the "state" of a pre-processor run.
466 Applying cpp_get_token repeatedly yields a stream of pre-processor
467 tokens. Usually, there is only one cpp_reader object active. */
468
469 struct cpp_reader
470 {
471 /* Top of buffer stack. */
472 cpp_buffer *buffer;
473
474 /* Token list used by get_directive_token. */
475 cpp_toklist directbuf;
476
477 /* A buffer used for both for cpp_get_token's output, and also internally. */
478 unsigned char *token_buffer;
479 /* Allocated size of token_buffer. CPP_RESERVE allocates space. */
480 unsigned int token_buffer_size;
481 /* End of the written part of token_buffer. */
482 unsigned char *limit;
483
484 /* Error counter for exit code */
485 unsigned int errors;
486
487 /* Line where a newline was first seen in a string constant. */
488 unsigned int multiline_string_line;
489
490 /* Current depth in #include directives that use <...>. */
491 unsigned int system_include_depth;
492
493 /* Current depth of buffer stack. */
494 unsigned int buffer_stack_depth;
495
496 /* Hash table of macros and assertions. See cpphash.c */
497 struct htab *hashtab;
498
499 /* Hash table of other included files. See cppfiles.c */
500 struct htab *all_include_files;
501
502 /* Chain of `actual directory' file_name_list entries,
503 for "" inclusion. */
504 struct file_name_list *actual_dirs;
505
506 /* Current maximum length of directory names in the search path
507 for include files. (Altered as we get more of them.) */
508 unsigned int max_include_len;
509
510 struct if_stack *if_stack;
511 const unsigned char *potential_control_macro;
512
513 /* Buffer of -M output. */
514 struct deps *deps;
515
516 /* A buffer used only by read_and_prescan (in cppfiles.c), which is
517 allocated once per cpp_reader object to keep it off the stack. */
518 unsigned char *input_buffer;
519 size_t input_buffer_len;
520
521 /* User visible options. */
522 struct cpp_options opts;
523
524 /* Nonzero means we have printed (while error reporting) a list of
525 containing files that matches the current status. */
526 unsigned char input_stack_listing_current;
527
528 /* If non-zero, macros are not expanded. */
529 unsigned char no_macro_expand;
530
531 /* If non-zero, directives cause a hard error. Used when parsing
532 macro arguments. */
533 unsigned char no_directives;
534
535 /* We're printed a warning recommending against using #import. */
536 unsigned char import_warning;
537
538 /* If true, characters between '<' and '>' are a single (string) token. */
539 unsigned char parsing_include_directive;
540
541 /* If true, # introduces an assertion (see do_assert) */
542 unsigned char parsing_if_directive;
543
544 /* If true, # and ## are the STRINGIZE and TOKPASTE operators */
545 unsigned char parsing_define_directive;
546
547 /* True if escape sequences (as described for has_escapes in
548 parse_buffer) should be emitted. */
549 unsigned char output_escapes;
550
551 /* 0: Have seen non-white-space on this line.
552 1: Only seen white space so far on this line.
553 2: Only seen white space so far in this file. */
554 unsigned char only_seen_white;
555
556 /* True after cpp_start_read completes. Used to inhibit some
557 warnings while parsing the command line. */
558 unsigned char done_initializing;
559 };
560
561 /* struct cpp_printer encapsulates state used to convert the stream of
562 tokens coming from cpp_get_token back into a text file. Not
563 everyone wants to do that, hence we separate the function. */
564
565 struct cpp_printer
566 {
567 FILE *outf; /* stream to write to */
568 const char *last_fname; /* previous file name */
569 unsigned int last_bsd; /* did we just push? */
570 unsigned int lineno; /* line currently being written */
571 unsigned int written; /* low water mark in token buffer */
572 };
573
574 #define CPP_FATAL_LIMIT 1000
575 /* True if we have seen a "fatal" error. */
576 #define CPP_FATAL_ERRORS(READER) ((READER)->errors >= CPP_FATAL_LIMIT)
577
578 /* Macros for manipulating the token_buffer. */
579
580 /* Number of characters currently in PFILE's output buffer. */
581 #define CPP_WRITTEN(PFILE) ((size_t)((PFILE)->limit - (PFILE)->token_buffer))
582 #define CPP_PWRITTEN(PFILE) ((PFILE)->limit)
583 #define CPP_ADJUST_WRITTEN(PFILE,DELTA) ((PFILE)->limit += (DELTA))
584 #define CPP_SET_WRITTEN(PFILE,N) ((PFILE)->limit = (PFILE)->token_buffer + (N))
585
586 #define CPP_OPTION(PFILE, OPTION) ((PFILE)->opts.OPTION)
587 #define CPP_BUFFER(PFILE) ((PFILE)->buffer)
588 #define CPP_BUF_LINE(BUF) ((BUF)->lineno)
589 #define CPP_BUF_COL(BUF) ((BUF)->cur - (BUF)->line_base)
590
591 /* Name under which this program was invoked. */
592 extern const char *progname;
593
594 extern void _cpp_lex_file PARAMS((cpp_reader *));
595 extern int cpp_handle_options PARAMS ((cpp_reader *, int, char **));
596 extern enum cpp_ttype cpp_get_token PARAMS ((cpp_reader *));
597 extern enum cpp_ttype cpp_get_non_space_token PARAMS ((cpp_reader *));
598
599 extern void cpp_reader_init PARAMS ((cpp_reader *));
600 extern cpp_printer *cpp_printer_init PARAMS ((cpp_reader *, cpp_printer *));
601 extern int cpp_start_read PARAMS ((cpp_reader *, cpp_printer *, const char *));
602 extern void cpp_output_tokens PARAMS ((cpp_reader *, cpp_printer *));
603 extern void cpp_output_list PARAMS ((cpp_reader *, cpp_printer *,
604 const cpp_toklist *));
605 extern void cpp_finish PARAMS ((cpp_reader *, cpp_printer *));
606 extern void cpp_cleanup PARAMS ((cpp_reader *));
607
608 extern cpp_buffer *cpp_file_buffer PARAMS((cpp_reader *));
609 extern void cpp_define PARAMS ((cpp_reader *, const char *));
610 extern void cpp_assert PARAMS ((cpp_reader *, const char *));
611 extern void cpp_undef PARAMS ((cpp_reader *, const char *));
612 extern void cpp_unassert PARAMS ((cpp_reader *, const char *));
613
614 extern void cpp_free_token_list PARAMS ((cpp_toklist *));
615
616 /* N.B. The error-message-printer prototypes have not been nicely
617 formatted because exgettext needs to see 'msgid' on the same line
618 as the name of the function in order to work properly. Only the
619 string argument gets a name in an effort to keep the lines from
620 getting ridiculously oversized. */
621
622 extern void cpp_ice PARAMS ((cpp_reader *, const char *msgid, ...))
623 ATTRIBUTE_PRINTF_2;
624 extern void cpp_fatal PARAMS ((cpp_reader *, const char *msgid, ...))
625 ATTRIBUTE_PRINTF_2;
626 extern void cpp_error PARAMS ((cpp_reader *, const char *msgid, ...))
627 ATTRIBUTE_PRINTF_2;
628 extern void cpp_warning PARAMS ((cpp_reader *, const char *msgid, ...))
629 ATTRIBUTE_PRINTF_2;
630 extern void cpp_pedwarn PARAMS ((cpp_reader *, const char *msgid, ...))
631 ATTRIBUTE_PRINTF_2;
632 extern void cpp_notice PARAMS ((cpp_reader *, const char *msgid, ...))
633 ATTRIBUTE_PRINTF_2;
634 extern void cpp_error_with_line PARAMS ((cpp_reader *, int, int, const char *msgid, ...))
635 ATTRIBUTE_PRINTF_4;
636 extern void cpp_warning_with_line PARAMS ((cpp_reader *, int, int, const char *msgid, ...))
637 ATTRIBUTE_PRINTF_4;
638 extern void cpp_pedwarn_with_line PARAMS ((cpp_reader *, int, int, const char *msgid, ...))
639 ATTRIBUTE_PRINTF_4;
640 extern void cpp_pedwarn_with_file_and_line PARAMS ((cpp_reader *, const char *, int, int, const char *msgid, ...))
641 ATTRIBUTE_PRINTF_5;
642 extern void cpp_error_from_errno PARAMS ((cpp_reader *, const char *));
643 extern void cpp_notice_from_errno PARAMS ((cpp_reader *, const char *));
644
645 /* In cpplex.c */
646 extern cpp_buffer *cpp_push_buffer PARAMS ((cpp_reader *,
647 const unsigned char *, long));
648 extern cpp_buffer *cpp_pop_buffer PARAMS ((cpp_reader *));
649 extern void cpp_scan_buffer PARAMS ((cpp_reader *, cpp_printer *));
650 extern void cpp_scan_buffer_nooutput PARAMS ((cpp_reader *));
651 extern int cpp_idcmp PARAMS ((const unsigned char *,
652 size_t, const char *));
653
654 /* In cpphash.c */
655 extern int cpp_defined PARAMS ((cpp_reader *,
656 const unsigned char *, int));
657
658 /* In cppfiles.c */
659 extern int cpp_included PARAMS ((cpp_reader *, const char *));
660 extern int cpp_read_file PARAMS ((cpp_reader *, const char *));
661
662 #ifdef __cplusplus
663 }
664 #endif
665 #endif /* __GCC_CPPLIB__ */
This page took 0.070327 seconds and 6 git commands to generate.