]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/commit - contrib/gcclibs/libcpp/macro.c
MFC r228474:
authored <ed@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 9 Feb 2012 16:55:20 +0000 (16:55 +0000)
committered <ed@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 9 Feb 2012 16:55:20 +0000 (16:55 +0000)
commit90a5da562d5f2e2ea61cf1e828878c0a805781ed
tree41c0d00eec265e7450ad3232e37d8f4094f86f5e
parent6a373984d7cf1cf1cb27055f905d8d0811bf3bee
MFC r228474:

  Add support for __COUNTER__.

  __COUNTER__ allows one to obtain incrementing (read: unique) numbers
  from the C preprocesor. This is useful when implementing things like a
  robust implementation of CTASSERT(), which currently fails when using
  it more than once on a single line of code. Probably not likely to cause
  any breakage, but still.

  __COUNTER__ was also added to GCC 4.3, but since that implementation is
  GPLv3 licensed, I took the liberty of implementing it without looking at
  any upstream sources. Therefore, this version is licensed under the same
  license as the rest of the code; GPLv2.

git-svn-id: svn://svn.freebsd.org/base/stable/9@231289 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
contrib/gcclibs/libcpp/include/cpplib.h
contrib/gcclibs/libcpp/init.c
contrib/gcclibs/libcpp/internal.h
contrib/gcclibs/libcpp/macro.c