Mercurial > hg > CbC > CbC_gcc
diff libcpp/init.c @ 48:9907f3135723
update CbC on GCC from 4.4.2 to 4.4.3.
author | kent <kent@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 07 Feb 2010 17:48:31 +0900 |
parents | 3bfb6c00c1e0 |
children | 77e2b8dfacca |
line wrap: on
line diff
--- a/libcpp/init.c Fri Jan 29 12:18:08 2010 +0900 +++ b/libcpp/init.c Sun Feb 07 17:48:31 2010 +0900 @@ -216,6 +216,9 @@ pfile->a_buff = _cpp_get_buff (pfile, 0); pfile->u_buff = _cpp_get_buff (pfile, 0); + /* Initialize table for push_macro/pop_macro. */ + pfile->pushed_macros = 0; + /* The expression parser stack. */ _cpp_expand_op_stack (pfile); @@ -245,6 +248,7 @@ cpp_destroy (cpp_reader *pfile) { cpp_context *context, *contextn; + struct def_pragma_macro *pmacro; tokenrun *run, *runn; int i; @@ -296,6 +300,17 @@ free (pfile->comments.entries); } + if (pfile->pushed_macros) + { + do + { + pmacro = pfile->pushed_macros; + pfile->pushed_macros = pmacro->next; + free (pmacro->name); + free (pmacro); + } + while (pfile->pushed_macros); + } free (pfile); }