From patchwork Tue Jun 4 00:44:02 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Iyer, Balaji V" X-Patchwork-Id: 248442 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 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "localhost", Issuer "www.qmailtoaster.com" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 1F0D42C007A for ; Tue, 4 Jun 2013 10:44:11 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:content-type :content-transfer-encoding:mime-version; q=dns; s=default; b=veO EmUNHFY96QcZB3d4WaSmrD1s7Xv+MhyCZpspT6JESyDA4tdfVkaYM4JnwIkzieZ8 wLxJnYe1K6Tl7Ll5dA5BLv7m1GNRKkglUARBr62ewKctLZa2XI1tVy6u6+o/rMsX NSQKT+tY+rzUdk26dXxVYCt9O91RvHcs+xmpsAZE= 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:from :to:subject:date:message-id:content-type :content-transfer-encoding:mime-version; s=default; bh=LMKThcljo 5bA+XGilbCG8GWnjfE=; b=bq9DNJDG/UrXWY9SNT9Aefp5UwQZMeDw39CbGXirP S0hVlPBd/q9319vgeW5x5jjjZ1erlEAb8JcoiFHlLV5pc2hzH/4JgaTVEOjOhnJO 2SxeB4EoBnGx9Skf6z4cPlSae+wXUfuipuBt5ymnwfjlOpx7qZPJFmrzibrnz+V5 iA= Received: (qmail 30572 invoked by alias); 4 Jun 2013 00:44:05 -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 30555 invoked by uid 89); 4 Jun 2013 00:44:05 -0000 X-Spam-SWARE-Status: No, score=-6.6 required=5.0 tests=AWL, BAYES_00, RCVD_IN_HOSTKARMA_W, RCVD_IN_HOSTKARMA_WL, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.1 Received: from mga02.intel.com (HELO mga02.intel.com) (134.134.136.20) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Tue, 04 Jun 2013 00:44:04 +0000 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 03 Jun 2013 17:44:02 -0700 X-ExtLoop1: 1 Received: from fmsmsx106.amr.corp.intel.com ([10.19.9.37]) by orsmga001.jf.intel.com with ESMTP; 03 Jun 2013 17:44:02 -0700 Received: from fmsmsx101.amr.corp.intel.com ([169.254.1.135]) by FMSMSX106.amr.corp.intel.com ([169.254.6.177]) with mapi id 14.03.0123.003; Mon, 3 Jun 2013 17:44:02 -0700 From: "Iyer, Balaji V" To: "gcc-patches@gcc.gnu.org" Subject: Added build_c_cast to c-family? Date: Tue, 4 Jun 2013 00:44:02 +0000 Message-ID: MIME-Version: 1.0 Hello Everyone, Is it OK to move build_c_cast prototype into c-common.h? The reason for this is that, I would like to share some of the code between array notation for C and C++ and this function is sort of required for both places. Also, the exact same call is available for both C and C++ with the same parameters at the same locations. The change involves removing the prototype from c-tree.h and cp-tree.h and moving it to c-common.h. Here is the changelogs and the patch to accomplish what I am requesting. Please let me know if it is OK for the trunk. gcc/c-family/ChangeLog 2013-06-03 Balaji V. Iyer * c-common.h (build_c_cast): Added new extern prototype. gcc/c/ChangeLog 2013-06-03 Balaji V. Iyer * c-tree.h (build_c_cast): Remove prototype. gcc/cp/ChangeLog 2013-06-03 Balaji V. Iyer * c-tree.h (build_c_cast): Remove prototype. Thanks, Balaji V. Iyer. Index: gcc/c-family/c-common.h =================================================================== --- gcc/c-family/c-common.h (revision 199630) +++ gcc/c-family/c-common.h (working copy) @@ -538,6 +538,7 @@ extern tree pushdecl (tree); extern tree build_modify_expr (location_t, tree, tree, enum tree_code, location_t, tree, tree); +extern tree build_c_cast (location_t, tree, tree); extern tree build_array_notation_expr (location_t, tree, tree, enum tree_code, location_t, tree, tree); extern tree build_array_notation_ref (location_t, tree, tree, tree, tree, tree); Index: gcc/c/c-tree.h =================================================================== --- gcc/c/c-tree.h (revision 199630) +++ gcc/c/c-tree.h (working copy) @@ -600,7 +600,6 @@ tree, tree); extern tree build_compound_expr (location_t, tree, tree); extern tree c_cast_expr (location_t, struct c_type_name *, tree); -extern tree build_c_cast (location_t, tree, tree); extern void store_init_value (location_t, tree, tree, tree); extern void error_init (const char *); extern void pedwarn_init (location_t, int opt, const char *); Index: gcc/cp/cp-tree.h =================================================================== --- gcc/cp/cp-tree.h (revision 199630) +++ gcc/cp/cp-tree.h (working copy) @@ -6000,7 +6000,6 @@ extern tree build_static_cast (tree, tree, tsubst_flags_t); extern tree build_reinterpret_cast (tree, tree, tsubst_flags_t); extern tree build_const_cast (tree, tree, tsubst_flags_t); -extern tree build_c_cast (location_t, tree, tree); extern tree cp_build_c_cast (tree, tree, tsubst_flags_t); extern tree build_x_modify_expr (location_t, tree, enum tree_code, tree,