From patchwork Thu Jun 29 14:53:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Sidwell X-Patchwork-Id: 782316 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wz2jG29B6z9s3T for ; Fri, 30 Jun 2017 00:53:37 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="jEU4E7Bw"; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=DEZW4hImb8oP2nAPoHAh5RbQGJAxJLvO1wLxmBZ/IqveLiFtXZ bK10OoLp9rQ+3Gt9sXl2EHOiu17SuKB1oRRMQ4zrAPdWTA+JUf/ce1gX4mM94ISr xtzZ9fnpUHG0uH3fdl7PX2HOXXyy/IoluQ/vrSkSIxhhWK6mNEXD2i9nY= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; s= default; bh=lsQBEYw2sN/TL4prqp1JB2/xw9I=; b=jEU4E7BwrZn9/2KNblj8 w+UsVmmP45gJZy0f6uNvPdFjr6/sBg6LvHrGBykVgO78kW767BgLJRF9TreDG9mK b9BtRzaR62C49WAPy3E63XFcZixNXibfz5rq+p8rU8SHtAsDB1kQTpPd12fnjWwF gpZc/Tba8JHz4oMwF2h0vqM= Received: (qmail 66784 invoked by alias); 29 Jun 2017 14:53:29 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 66768 invoked by uid 89); 29 Jun 2017 14:53:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.1 required=5.0 tests=BAYES_00, FREEMAIL_FROM, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=today's X-HELO: mail-yb0-f172.google.com Received: from mail-yb0-f172.google.com (HELO mail-yb0-f172.google.com) (209.85.213.172) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 29 Jun 2017 14:53:26 +0000 Received: by mail-yb0-f172.google.com with SMTP id v197so3706741ybv.3 for ; Thu, 29 Jun 2017 07:53:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:to:from:subject:message-id:date :user-agent:mime-version:content-language; bh=lCGSO5Pv8Xw80X/Zvf0R7fhR3eg0rGTz2bPNe4ss5qM=; b=R53fgJGtH7pyNNdFYz99qV3AQdMlMaQIA2/zeRRTspX7Gn2W9DVXbD2WU1dN7ToaSh ShxF0kTFsIdgp8mWIOOuhUN3OnSofgETmxbwnBAjxAqo51McTF3c/11GR5ILZ8HlVzug pZu9ItN83geLZyqPVK6rxZ+tbm8Taewda7ovlWCOS0Geoi4VIH+oRsWw16+HZw0Dhdog 7x/z/ctJ2AkbI6hvrRjuUr/4/U/kytocLBRph4TwCwbnkXWNf8euiLevrIUdX9OnuoOH dRdY3vzC2lKow720XJ+yYuOqztCHslE0q2/JF2uu6MACFK0YwrJhYftJwtI3tEIQ+7Xx mjdQ== X-Gm-Message-State: AKS2vOxq94ZDFvgozNKXY818mtdpp/G7BJ/jzD1zghMFFI44RS/agHoX IsoY/zqUfoYBnQ== X-Received: by 10.37.3.141 with SMTP id 135mr12219926ybd.222.1498748005120; Thu, 29 Jun 2017 07:53:25 -0700 (PDT) Received: from ?IPv6:2620:10d:c0a3:20fb:7500:e7fb:4a6f:2254? ([2620:10d:c091:200::1:9018]) by smtp.googlemail.com with ESMTPSA id k64sm2160480ywe.23.2017.06.29.07.53.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Jun 2017 07:53:24 -0700 (PDT) To: GCC Patches From: Nathan Sidwell Subject: [C++ PATCH] special identifiers Message-ID: Date: Thu, 29 Jun 2017 10:53:22 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 We currently #define a bunch of names in cp-tree.h, never override them, and then use them exactly once during initialization. I think these were hold-overs from when changing from the old to new ABI. Anyway, I see no reason for the indirection. I also renamed the cdtor variant names to be consistent with the generic name. IIRC '__ct' and '__dt' were from the old-abi cdtor names. These never escape the compiler. I think that's it for today's patching run. nathan 2017-06-29 Nathan Sidwell * cp-tree.h (THIS_NAME, IN_CHARGE_NAME, VTBL_PTR_TYPE, VTABLE_DELTA_NAME, VTABLE_PFN_NAME): Delete. * decl.c (initialize_predefined_identifiers): Name cdtor special names consistently. Use literals for above deleted defines. (cxx_init_decl_processing): Use literal for vtbl_ptr_type name, Index: cp-tree.h =================================================================== --- cp-tree.h (revision 249788) +++ cp-tree.h (working copy) @@ -5195,14 +5195,6 @@ extern GTY(()) vec *keyed_c #endif /* NO_DOLLAR_IN_LABEL */ #endif /* NO_DOT_IN_LABEL */ -#define THIS_NAME "this" - -#define IN_CHARGE_NAME "__in_chrg" - -#define VTBL_PTR_TYPE "__vtbl_ptr_type" -#define VTABLE_DELTA_NAME "__delta" -#define VTABLE_PFN_NAME "__pfn" - #define LAMBDANAME_PREFIX "__lambda" #define LAMBDANAME_FORMAT LAMBDANAME_PREFIX "%d" Index: decl.c =================================================================== --- decl.c (revision 249788) +++ decl.c (working copy) @@ -3955,16 +3955,16 @@ initialize_predefined_identifiers (void) /* Some of these names have a trailing space so that it is impossible for them to conflict with names written by users. */ {"__ct ", &ctor_identifier, cik_ctor}, - {"__base_ctor ", &base_ctor_identifier, cik_ctor}, - {"__comp_ctor ", &complete_ctor_identifier, cik_ctor}, + {"__ct_base ", &base_ctor_identifier, cik_ctor}, + {"__ct_comp ", &complete_ctor_identifier, cik_ctor}, {"__dt ", &dtor_identifier, cik_dtor}, - {"__comp_dtor ", &complete_dtor_identifier, cik_dtor}, - {"__base_dtor ", &base_dtor_identifier, cik_dtor}, - {"__deleting_dtor ", &deleting_dtor_identifier, cik_dtor}, - {IN_CHARGE_NAME, &in_charge_identifier, cik_normal}, - {THIS_NAME, &this_identifier, cik_normal}, - {VTABLE_DELTA_NAME, &delta_identifier, cik_normal}, - {VTABLE_PFN_NAME, &pfn_identifier, cik_normal}, + {"__dt_base ", &base_dtor_identifier, cik_dtor}, + {"__dt_comp ", &complete_dtor_identifier, cik_dtor}, + {"__dt_del ", &deleting_dtor_identifier, cik_dtor}, + {"__in_chrg", &in_charge_identifier, cik_normal}, + {"this", &this_identifier, cik_normal}, + {"__delta", &delta_identifier, cik_normal}, + {"__pfn", &pfn_identifier, cik_normal}, {"_vptr", &vptr_identifier, cik_normal}, {"__vtt_parm", &vtt_parm_identifier, cik_normal}, {"::", &global_identifier, cik_normal}, @@ -4094,7 +4094,7 @@ cxx_init_decl_processing (void) vtable_entry_type = build_pointer_type (vfunc_type); } - record_builtin_type (RID_MAX, VTBL_PTR_TYPE, vtable_entry_type); + record_builtin_type (RID_MAX, "__vtbl_ptr_type", vtable_entry_type); vtbl_type_node = build_cplus_array_type (vtable_entry_type, NULL_TREE);