This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PING! [3/4] [patch, middle-end] Make native_encode/interpret_expr non-static.


:ADDPATCH middle-end:

Ping? (As noted in 2/4, I know this is a touch early for a ping, but I also need to add it to the tracker, and manual adding doesn't work.)

Thanks,
- Brooks

At 03:20 PM 4/6/2007, Brooks Moses wrote:
For the TRANSFER intrinsic in GFortran, we will need access to the native_encode_expr and native_interpret_expr functions in fold-const.c, which are currently static. This patch exposes them to the world, putting the prototypes in tree.h alongside all the existing fold-const.c prototypes.

---------------------------------------------------------------------
2007-04-06  Brooks Moses  <brooks.moses@codesourcery.com>

        fold-const.c: Remove prototypes for native_encode_expr and
        native_interpret_expr.
        (native_encode_expr): Make non-static.
        (native_interpret_expr): Likewise.
        tree.h: Add prototypes for the above.

---------------------------------------------------------------------

Tested with a bootstrap and "make check-gcc" on i686-pc-linux-gnu. Ok for trunk?

- Brooks


Index: fold-const.c =================================================================== --- fold-const.c (revision 123513) +++ fold-const.c (working copy) @@ -143,8 +143,6 @@ static tree fold_negate_const (tree, tree); static tree fold_not_const (tree, tree); static tree fold_relational_const (enum tree_code, tree, tree, tree); -static int native_encode_expr (tree, unsigned char *, int); -static tree native_interpret_expr (tree, unsigned char *, int);


/* We know that A1 + B1 = SUM1, using 2's complement arithmetic and ignoring @@ -7271,7 +7269,7 @@ buffer PTR of length LEN bytes. Return the number of bytes placed in the buffer, or zero upon failure. */

-static int
+int
 native_encode_expr (tree expr, unsigned char *ptr, int len)
 {
   switch (TREE_CODE (expr))
@@ -7450,7 +7448,7 @@
    we return a REAL_CST, etc...  If the buffer cannot be interpreted,
    return NULL_TREE.  */

-static tree
+tree
 native_interpret_expr (tree type, unsigned char *ptr, int len)
 {
   switch (TREE_CODE (type))
Index: tree.h
===================================================================
--- tree.h      (revision 123513)
+++ tree.h      (working copy)
@@ -4382,6 +4382,10 @@
    otherwise.  */
 extern int folding_initializer;

+/* Convert between trees and native memory representation.  */
+extern int native_encode_expr (tree, unsigned char *, int);
+extern tree native_interpret_expr (tree, unsigned char *, int);
+
 /* Fold constants as much as possible in an expression.
    Returns the simplified expression.
    Acts only on the top level of the expression;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]