summaryrefslogtreecommitdiff
path: root/gnu/dist/gcc4/libcpp/init.c
diff options
context:
space:
mode:
authorapb <apb@NetBSD.org>2012-11-24 09:07:44 +0000
committerapb <apb@NetBSD.org>2012-11-24 09:07:44 +0000
commitedd45c4f725efefe883e67070de81e0091bcaf55 (patch)
treec0a0652e3a400a2a2be9f0f502defff805072891 /gnu/dist/gcc4/libcpp/init.c
parent84d501111b538db76b23a1dee6cdeb7f9b90683d (diff)
Teach gcc4.1's cpp about the magic __COUNTER__ macro,
which returns a unique integer each time it is expanded. This code was written without reference to any other implementation of the same feature.
Diffstat (limited to 'gnu/dist/gcc4/libcpp/init.c')
-rw-r--r--gnu/dist/gcc4/libcpp/init.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gnu/dist/gcc4/libcpp/init.c b/gnu/dist/gcc4/libcpp/init.c
index 2e245b7e083..e6273c60dc4 100644
--- a/gnu/dist/gcc4/libcpp/init.c
+++ b/gnu/dist/gcc4/libcpp/init.c
@@ -309,6 +309,7 @@ static const struct builtin builtin_array[] =
B("__BASE_FILE__", BT_BASE_FILE),
B("__LINE__", BT_SPECLINE),
B("__INCLUDE_LEVEL__", BT_INCLUDE_LEVEL),
+ B("__COUNTER__", BT_COUNTER),
/* Keep builtins not used for -traditional-cpp at the end, and
update init_builtins() if any more are added. */
B("_Pragma", BT_PRAGMA),