This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] clarifications for comments in cpp
- From: Martin Schaffner <schaffner at gmx dot li>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 23 Jun 2003 20:42:20 +0200 (MEST)
- Subject: [patch] clarifications for comments in cpp
Hi,
included in this e-mail is a patch clarifying a few comments in the
preprocessor code.
Martin Schaffner
2003-06-23 Martin Schaffner <schaffner at gmx.li>
* cppfiles.c: Clarify comments.
* cpphash.h: Likewise.
* cpplex.c: Likewise.
* cpplib.h: Likewise.
* cppmacro.c: Likewise.
* mkdeps.h: Likewise.
Index: cppfiles.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/cppfiles.c,v
retrieving revision 1.172
diff -c -3 -p -r1.172 cppfiles.c
*** cppfiles.c 17 Jun 2003 06:17:42 -0000 1.172
--- cppfiles.c 23 Jun 2003 18:24:29 -0000
*************** stack_include_file (cpp_reader *pfile, s
*** 402,408 ****
}
if (pfile->buffer)
! /* We don't want MI guard advice for the main file. */
inc->include_count++;
/* Push a buffer. */
--- 402,408 ----
}
if (pfile->buffer)
! /* No multiple include guard advice for the main file. */
inc->include_count++;
/* Push a buffer. */
*************** _cpp_execute_include (cpp_reader *pfile,
*** 741,747 ****
}
/* Locate HEADER, and determine whether it is newer than the current
! file. If it cannot be located or dated, return -1, if it is newer
newer, return 1, otherwise 0. */
int
_cpp_compare_file_date (cpp_reader *pfile, const char *fname,
--- 741,747 ----
}
/* Locate HEADER, and determine whether it is newer than the current
! file. If it cannot be located or dated, return -1, if it is
newer, return 1, otherwise 0. */
int
_cpp_compare_file_date (cpp_reader *pfile, const char *fname,
Index: cpphash.h
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/cpphash.h,v
retrieving revision 1.190
diff -c -3 -p -r1.190 cpphash.h
*** cpphash.h 17 Jun 2003 06:17:42 -0000 1.190
--- cpphash.h 23 Jun 2003 18:24:29 -0000
*************** struct cpp_reader
*** 392,398 ****
list of recognized pragmas. */
struct pragma_entry *pragmas;
! /* Call backs. */
struct cpp_callbacks cb;
/* Identifier hash table. */
--- 392,398 ----
list of recognized pragmas. */
struct pragma_entry *pragmas;
! /* Call backs to frontends of CPP. */
struct cpp_callbacks cb;
/* Identifier hash table. */
Index: cpplex.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/cpplex.c,v
retrieving revision 1.239
diff -c -3 -p -r1.239 cpplex.c
*** cpplex.c 17 Jun 2003 06:17:43 -0000 1.239
--- cpplex.c 23 Jun 2003 18:24:29 -0000
*************** _cpp_lex_token (cpp_reader *pfile)
*** 673,679 ****
/* Outside a directive, invalidate controlling macros. At file
EOF, _cpp_lex_direct takes care of popping the buffer, so we never
! get here and MI optimization works. */
pfile->mi_valid = false;
if (!pfile->state.skipping || result->type == CPP_EOF)
--- 673,679 ----
/* Outside a directive, invalidate controlling macros. At file
EOF, _cpp_lex_direct takes care of popping the buffer, so we never
! get here and multiple include optimization works. */
pfile->mi_valid = false;
if (!pfile->state.skipping || result->type == CPP_EOF)
Index: cpplib.h
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/cpplib.h,v
retrieving revision 1.257
diff -c -3 -p -r1.257 cpplib.h
*** cpplib.h 23 Jun 2003 15:27:34 -0000 1.257
--- cpplib.h 23 Jun 2003 18:24:29 -0000
*************** struct cpp_options
*** 371,377 ****
unsigned char stdc_0_in_system_headers;
};
! /* Call backs. */
struct cpp_callbacks
{
/* Called when a new line of preprocessed output is started. */
--- 371,377 ----
unsigned char stdc_0_in_system_headers;
};
! /* Call backs to frontends of CPP. */
struct cpp_callbacks
{
/* Called when a new line of preprocessed output is started. */
Index: cppmacro.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/cppmacro.c,v
retrieving revision 1.135
diff -c -3 -p -r1.135 cppmacro.c
*** cppmacro.c 17 Jun 2003 06:17:44 -0000 1.135
--- cppmacro.c 23 Jun 2003 18:24:30 -0000
*************** _cpp_pop_context (cpp_reader *pfile)
*** 1040,1046 ****
/* Eternal routine to get a token. Also used nearly everywhere
internally, except for places where we know we can safely call
! the lexer directly, such as lexing a directive name.
Macro expansions and directives are transparently handled,
including entering included files. Thus tokens are post-macro
--- 1040,1046 ----
/* Eternal routine to get a token. Also used nearly everywhere
internally, except for places where we know we can safely call
! _cpp_lex_token directly, such as lexing a directive name.
Macro expansions and directives are transparently handled,
including entering included files. Thus tokens are post-macro
Index: mkdeps.h
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/mkdeps.h,v
retrieving revision 1.5
diff -c -3 -p -r1.5 mkdeps.h
*** mkdeps.h 10 Jan 2003 02:22:04 -0000 1.5
--- mkdeps.h 23 Jun 2003 18:24:30 -0000
*************** extern void deps_free PARAMS ((struct d
*** 39,45 ****
extern void deps_add_target PARAMS ((struct deps *, const char *, int));
/* Sets the default target if none has been given already. An empty
! string as the default target in interpreted as stdin. */
extern void deps_add_default_target PARAMS ((struct deps *, const char
*));
/* Add a dependency (appears on the right side of the colon) to the
--- 39,45 ----
extern void deps_add_target PARAMS ((struct deps *, const char *, int));
/* Sets the default target if none has been given already. An empty
! string as the default target is interpreted as stdin. */
extern void deps_add_default_target PARAMS ((struct deps *, const char
*));
/* Add a dependency (appears on the right side of the colon) to the
--
+++ GMX - Mail, Messaging & more http://www.gmx.net +++
Bitte lächeln! Fotogalerie online mit GMX ohne eigene Homepage!