From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9123 invoked by alias); 23 May 2007 21:34:48 -0000 Received: (qmail 9113 invoked by uid 22791); 23 May 2007 21:34:46 -0000 X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.33.17) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 23 May 2007 21:34:42 +0000 Received: from spaceape7.eur.corp.google.com (spaceape7.eur.corp.google.com [172.28.16.141]) by smtp-out.google.com with ESMTP id l4NLYSdV029616 for ; Wed, 23 May 2007 22:34:28 +0100 Received: from py-out-1112.google.com (pyea73.prod.google.com [10.34.153.73]) by spaceape7.eur.corp.google.com with ESMTP id l4NLYBkU010467 for ; Wed, 23 May 2007 22:34:12 +0100 Received: by py-out-1112.google.com with SMTP id a73so511202pye for ; Wed, 23 May 2007 14:34:11 -0700 (PDT) Received: by 10.35.121.12 with SMTP id y12mr979532pym.1179956051534; Wed, 23 May 2007 14:34:11 -0700 (PDT) Received: by 10.35.8.17 with HTTP; Wed, 23 May 2007 14:34:11 -0700 (PDT) Message-ID: <65dd6fd50705231434h2a9a8bf1h3ee9a7b2a19c2823@mail.gmail.com> Date: Wed, 23 May 2007 21:34:00 -0000 From: "Ollie Wild" To: "GCC Patches" , tromey@redhat.com Subject: PATCH: Adds a __COUNTER__ macro. Cc: "Dave Korn" , "Basile STARYNKEVITCH" , "Ian Lance Taylor" MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_99257_13665668.1179956051490" Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2007-05/txt/msg01579.txt.bz2 ------=_Part_99257_13665668.1179956051490 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Content-length: 1471 This patch adds a builtin __COUNTER__ macro which expands to incrementing integral values starting from 0. In conjunction with the '##' operator, this is useful for generating unique identifiers. Per my comments at http://gcc.gnu.org/ml/gcc-patches/2007-05/msg01488.html, this does not include some additional logic to integrate with the pending -fdirectives-only patch. Tested with a full bootstrap and testsuite run on i686-pc-linux-gnu. Ollie :ADDPATCH libcpp: 2007-05-23 Ollie Wild * 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. 2007-05-23 Ollie Wild * doc/cpp.texi (Common Predefined Macros): Add __COUNTER__ description. 2007-05-23 Ollie Wild * 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. ------=_Part_99257_13665668.1179956051490 Content-Type: text/x-patch; name=__COUNTER__.patch; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: base64 X-Attachment-Id: f_f22b2rk1 Content-Disposition: attachment; filename="__COUNTER__.patch" Content-length: 10732 ZGlmZiAtLWdpdCBhL2djYy9kb2MvY3BwLnRleGkgYi9nY2MvZG9jL2NwcC50 ZXhpCmluZGV4IGU2Nzg2Y2YuLjU0OTQxYTkgMTAwNjQ0Ci0tLSBhL2djYy9k b2MvY3BwLnRleGkKKysrIGIvZ2NjL2RvYy9jcHAudGV4aQpAQCAtMTkxNyw2 ICsxOTE3LDEzIEBAIHVuZGVyc2NvcmVzLgogCiBAdGFibGUgQGNvZGUKIAor QGl0ZW0gX19DT1VOVEVSX18KK1RoaXMgbWFjcm8gZXhwYW5kcyB0byBzZXF1 ZW50aWFs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Rv cmUgc3BlY19ub2Rlcywgd2hpY2ggd2lsbCBiZSBmdWxsIG9mIHJlZmVyZW5j ZXMgdG8gdGhlIG9sZCAKICAgICAgaGFzaHRhYmxlIGVudHJpZXMgYW5kIHNv IHdpbGwgbm93IGJlIGludmFsaWQuICAqLwpAQCAtNjkwLDYgKzcyNSwxMiBA QCBjcHBfcmVhZF9zdGF0ZSAoY3BwX3JlYWRlciAqciwgY29uc3QgY2hhciAq bmFtZSwgRklMRSAqZiwKICAgaWYgKCEgX2NwcF9yZWFkX2ZpbGVfZW50cmll cyAociwgZikpCiAgICAgZ290byBlcnJvcjsKIAorICBpZiAoZnJlYWQgKCZj b3VudGVyLCBzaXplb2YgKGNvdW50ZXIpLCAxLCBmKSAhPSAxKQorICAgIGdv dG8gZXJyb3I7CisKKyAgaWYgKCFyLT5jb3VudGVyKQorICAgIHItPmNvdW50 ZXIgPSBjb3VudGVyOworCiAgIHJldHVybiAwOwogICAKICBlcnJvcjoK ------=_Part_99257_13665668.1179956051490--