* Added build_c_cast to c-family?
@ 2013-06-04 0:44 Iyer, Balaji V
0 siblings, 0 replies; only message in thread
From: Iyer, Balaji V @ 2013-06-04 0:44 UTC (permalink / raw)
To: gcc-patches
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 <balaji.v.iyer@intel.com>
* c-common.h (build_c_cast): Added new extern prototype.
gcc/c/ChangeLog
2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c-tree.h (build_c_cast): Remove prototype.
gcc/cp/ChangeLog
2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c-tree.h (build_c_cast): Remove prototype.
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,
Thanks,
Balaji V. Iyer.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-06-04 0:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-04 0:44 Added build_c_cast to c-family? Iyer, Balaji V
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).