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]

[C++] misc patch spew.c


All,

This patch tidies up spew.c w.r.t macros.

Bootstrapped i686-pc-linux-gnu, all languages, no regressions.

Graham

cp/ChangeLog

	* spew.c (YYCHAR): Uppercase macro parameter and add
	parenthesis.
	(YYCODE): Likewise.
	(NAME): Uppercase macro parameter.

-------------------------------------------------------------------
Index: spew.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/spew.c,v
retrieving revision 1.57
diff -c -p -r1.57 spew.c
*** spew.c      2001/12/18 03:35:39     1.57
--- spew.c      2002/01/08 10:25:14
***************
*** 1,6 ****
  /* Type Analyzer for GNU C++.
     Copyright (C) 1987, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
!    1999, 2000, 2001 Free Software Foundation, Inc.
     Hacked... nay, bludgeoned... by Mark Eichin (eichin@cygnus.com)

  This file is part of GNU CC.
--- 1,6 ----
  /* Type Analyzer for GNU C++.
     Copyright (C) 1987, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
!    1999, 2000, 2001, 2002 Free Software Foundation, Inc.
     Hacked... nay, bludgeoned... by Mark Eichin (eichin@cygnus.com)

  This file is part of GNU CC.
*************** read_token (t)
*** 261,268 ****

    switch (last_token)
      {
! #define YYCHAR(yy)    t->yychar = yy; break;
! #define YYCODE(c)     t->yylval.code = c;

      case CPP_EQ:                              YYCHAR('=');
      case CPP_NOT:                             YYCHAR('!');
--- 261,268 ----

    switch (last_token)
      {
! #define YYCHAR(YY)    t->yychar = (YY); break;
! #define YYCODE(C)     t->yylval.code = (C);

      case CPP_EQ:                              YYCHAR('=');
      case CPP_NOT:                             YYCHAR('!');
*************** debug_yychar (yy)
*** 1465,1471 ****

  #endif

! #define NAME(type) cpp_type2name (type)

  void
  yyerror (msgid)
--- 1465,1471 ----

  #endif

! #define NAME(TYPE) cpp_type2name (TYPE)

  void
  yyerror (msgid)
------------------------------------------------------------------


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