This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] clarifications for comments in cpp


On Montag, Juni 23, 2003, at 09:15 Uhr, Zack Weinberg wrote:

Martin Schaffner <schaffner@gmx.li> writes:

Hi,

included in this e-mail is a patch clarifying a few comments in the
preprocessor code.

Thank you, but I think some of these are unnecessary.

Thank you for your review. I changed the patch accordingly.


  /* 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.
+    _cpp_lex_token directly, such as lexing a directive name.


OK; please also fix the typo on the first line of the comment ("eternal" should be "external").


He, I thought "eternal" was supposed to mean "used all the time"... :-)


Martin Schaffner

2003-06-24 Martin Schaffner <schaffner at gmx.li>

	* cppfiles.c: Clarify comments.
	* cpphash.h: Likewise.
	* cpplib.h: Likewise.
	* cppmacro.c: Likewise.
	* mkdeps.h: Likewise.

Index: gcc/cppfiles.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/cppfiles.c,v
retrieving revision 1.172
diff -c -3 -p -r1.172 cppfiles.c
*** gcc/cppfiles.c	17 Jun 2003 06:17:42 -0000	1.172
--- gcc/cppfiles.c	23 Jun 2003 23:32:25 -0000
*************** _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: gcc/cpphash.h
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/cpphash.h,v
retrieving revision 1.190
diff -c -3 -p -r1.190 cpphash.h
*** gcc/cpphash.h	17 Jun 2003 06:17:42 -0000	1.190
--- gcc/cpphash.h	23 Jun 2003 23:32:30 -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 users of CPP.  */
    struct cpp_callbacks cb;

    /* Identifier hash table.  */
Index: gcc/cpplib.h
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/cpplib.h,v
retrieving revision 1.257
diff -c -3 -p -r1.257 cpplib.h
*** gcc/cpplib.h	23 Jun 2003 15:27:34 -0000	1.257
--- gcc/cpplib.h	23 Jun 2003 23:32:38 -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 users of CPP.  */
  struct cpp_callbacks
  {
    /* Called when a new line of preprocessed output is started.  */
Index: gcc/cppmacro.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/cppmacro.c,v
retrieving revision 1.135
diff -c -3 -p -r1.135 cppmacro.c
*** gcc/cppmacro.c	17 Jun 2003 06:17:44 -0000	1.135
--- gcc/cppmacro.c	23 Jun 2003 23:32:47 -0000
*************** _cpp_pop_context (cpp_reader *pfile)
*** 1038,1046 ****
    pfile->context = context->prev;
  }

! /* 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
--- 1038,1046 ----
    pfile->context = context->prev;
  }

! /* External 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: gcc/mkdeps.h
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/mkdeps.h,v
retrieving revision 1.5
diff -c -3 -p -r1.5 mkdeps.h
*** gcc/mkdeps.h 10 Jan 2003 02:22:04 -0000 1.5
--- gcc/mkdeps.h 23 Jun 2003 23:32:49 -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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]