C++ macro patches 4 of 6

GrahamS grahams@rcp.co.uk
Sun May 16 12:12:00 GMT 1999


Hi

Here is the 4th of six patches for the gcc/cp directory which which 
fixes some potential problems which macro definitions.

The patches basically add parenthesis around each use of macro parameter
in it definition.

The patch is against the egcs-19990502 snapshot.

Graham

ChangeLog and patch for semantics.c
====================================

        * semantics.c (RECHAIN_STMTS): Add parenthesis to uses 
	* of macro parameter.

*** semantics.c.orig	Sat May  8 21:33:27 1999
--- semantics.c	Sat May  8 21:33:59 1999
***************
*** 49,57 ****
  
  #define RECHAIN_STMTS(stmt, substmt, last)	\
    do {						\
!     substmt = last;			        \
      TREE_CHAIN (stmt) = NULL_TREE;		\
!     last_tree = stmt;				\
    } while (0)
  
  #define RECHAIN_STMTS_FROM_LAST(stmt, substmt)	\
--- 49,57 ----
  
  #define RECHAIN_STMTS(stmt, substmt, last)	\
    do {						\
!     (substmt) = (last);			        \
      TREE_CHAIN (stmt) = NULL_TREE;		\
!     last_tree = (stmt);				\
    } while (0)
  
  #define RECHAIN_STMTS_FROM_LAST(stmt, substmt)	\


More information about the Gcc-patches mailing list