]> git.ipfire.org Git - thirdparty/gcc.git/commit - libcpp/macro.c
cpphash.h (POOL_ALIGN, [...]): Remove.
authorNeil Booth <neil@daikokuya.demon.co.uk>
Sun, 30 Sep 2001 10:03:11 +0000 (10:03 +0000)
committerNeil Booth <neil@gcc.gnu.org>
Sun, 30 Sep 2001 10:03:11 +0000 (10:03 +0000)
commit8c3b269309f3b3651362697d48a3ade54bbddb55
tree78d68f969b236c6a6934656003c802393ecd85b7
parent218e1e912d74b89f0a6bd7c694bdc89c4515610b
cpphash.h (POOL_ALIGN, [...]): Remove.

* cpphash.h (POOL_ALIGN, POOL_FRONT, POOL_LIMIT, POOL_BASE,
POOL_SIZE, POOL_ROOM, POOL_COMMIT, struct cpp_chunk,
struct cpp_pool, _cpp_init_pool, _cpp_free_pool, _cpp_pool_reserve,
_cpp_pool_alloc, _cpp_next_chunk): Remove.
(_cpp_extend_buff, BUFF_ROOM): Update.
(_cpp_append_extend_buff): New.
(struct cpp_reader): Remove macro_pool, add a_buff.
* cppinit.c (cpp_create_reader): Initialize a_buff, instead of
macro_pool.
(cpp_destroy): Free a_buff instead of macro_pool.
* cpplex.c (new_chunk, chunk_suitable, _cpp_next_chunk,
new_chunk, _cpp_init_pool, _cpp_free_pool, _cpp_pool_reserve,
_cpp_pool_alloc, ): Remove.
(parse_number, parse_string): Update use of _cpp_extend_buff.
(_cpp_extend_buff): Update.
(_cpp_append_extend_buff, cpp_aligned_alloc): New.
* cpplib.c (glue_header_name, parse_answer):
Update use of _cpp_extend_buff.
(cpp_register_pragma, cpp_register_pragma_space): Use
_cpp_aligned_alloc.
(do_assert, do_unassert): Check for EOL, update.
* cppmacro.c (stringify_arg, collect_args): Update to use
_cpp_extend_buff and _cpp_append_extend_buff.
(save_parameter, parse_params, alloc_expansion_token,
_cpp_create_definition): Rework memory management.

* gcc.dg/cpp/redef2.c: Add test.

From-SVN: r45899
gcc/ChangeLog
gcc/cpphash.h
gcc/cppinit.c
gcc/cpplex.c
gcc/cpplib.c
gcc/cppmacro.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/cpp/redef2.c