]> git.ipfire.org Git - thirdparty/gcc.git/commit - libcpp/ChangeLog
macro.c (_cpp_builtin_macro_text): Handle BT_COUNTER.
authorOllie Wild <aaw@google.com>
Thu, 24 May 2007 20:55:36 +0000 (20:55 +0000)
committerOllie Wild <aaw@gcc.gnu.org>
Thu, 24 May 2007 20:55:36 +0000 (20:55 +0000)
commita702045a246397c2d31e1671fc3140112e669ec6
tree39f5da17b3f4b0f1ab1e9e7b4922fef43daed126
parente1b871ecc12b6c2a7b62a64ffbbd0714ab8d5c56
macro.c (_cpp_builtin_macro_text): Handle BT_COUNTER.

* macro.c (_cpp_builtin_macro_text): Handle BT_COUNTER.
* pch.c (cpp_write_pch_deps): Save __COUNTER__ state.
(cpp_write_pch_state): Save __COUNTER__ state.
(cpp_valid_state): Check valid __COUNTER__ state.
(cpp_read_state): Read new __COUNTER__ state.
* include/cpplib.h (enum builtin_type): Add BT_COUNTER enumerator.
* init.c (builtin_array): Add __COUNTER__/BT_COUNTER.
* internal.h (struct cpp_reader): Add counter member.

* gcc.dg/cpp/counter-1.c: New test.
* gcc.dg/pch/counter-1.c: New test.
* gcc.dg/pch/counter-1.hs: New file.
* gcc.dg/pch/counter-2.c: New test.
* gcc.dg/pch/counter-2.hs: New file.
* gcc.dg/pch/counter-3.c: New test.
* gcc.dg/pch/counter-3.hs: New file.

* doc/cpp.texi (Common Predefined Macros): Add __COUNTER__
description.

From-SVN: r125041
16 files changed:
gcc/ChangeLog
gcc/doc/cpp.texi
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/cpp/counter-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/pch/counter-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/pch/counter-1.hs [new file with mode: 0644]
gcc/testsuite/gcc.dg/pch/counter-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/pch/counter-2.hs [new file with mode: 0644]
gcc/testsuite/gcc.dg/pch/counter-3.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/pch/counter-3.hs [new file with mode: 0644]
libcpp/ChangeLog
libcpp/include/cpplib.h
libcpp/init.c
libcpp/internal.h
libcpp/macro.c
libcpp/pch.c