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]

Re: RFA: Fix assembler data directives emitted for variable length structures


> 	* output.h (output_constant): Update prototype and descriptive
> 	comment.

Please watch out for long lines (this one has 92 characters).  It turns out 
that output_constant can be privatized, the last use outside varasm.c in the 
Java front-end was removed in the course of 4.8.x development.

Tested on x86_64-suse-linux, applied on the mainline as obvious.


2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>

	* output.h (output_constant): Delete.
	* varasm.c (output_constant): Make private.


-- 
Eric Botcazou
Index: varasm.c
===================================================================
--- varasm.c	(revision 206803)
+++ varasm.c	(working copy)
@@ -117,8 +117,8 @@ static int compare_constant (const tree,
 static tree copy_constant (tree);
 static void output_constant_def_contents (rtx);
 static void output_addressed_constants (tree);
-static unsigned HOST_WIDE_INT array_size_for_constructor (tree);
-static unsigned min_align (unsigned, unsigned);
+static unsigned HOST_WIDE_INT output_constant (tree, unsigned HOST_WIDE_INT,
+					       unsigned int);
 static void globalize_decl (tree);
 static bool decl_readonly_section_1 (enum section_category);
 #ifdef BSS_SECTION_ASM_OP
@@ -4602,7 +4602,7 @@ static unsigned HOST_WIDE_INT
 
    ALIGN is the alignment of the data in bits.  */
 
-unsigned HOST_WIDE_INT
+static unsigned HOST_WIDE_INT
 output_constant (tree exp, unsigned HOST_WIDE_INT size, unsigned int align)
 {
   enum tree_code code;
Index: output.h
===================================================================
--- output.h	(revision 206803)
+++ output.h	(working copy)
@@ -290,18 +290,6 @@ extern void output_object_blocks (void);
 
 extern void output_quoted_string (FILE *, const char *);
 
-/* Output assembler code for constant EXP to FILE, with no label.
-   This includes the pseudo-op such as ".int" or ".byte", and a newline.
-   Assumes output_addressed_constants has been done on EXP already.
-
-   Generate at least SIZE bytes of assembler data, padding at the end
-   with zeros if necessary.  SIZE must always be specified.  The returned
-   value is the actual number of bytes of assembler data generated, which
-   may be bigger than SIZE if the object contains a variable length field.
-
-   ALIGN is the alignment in bits that may be assumed for the data.  */
-extern unsigned HOST_WIDE_INT output_constant (tree, unsigned HOST_WIDE_INT, unsigned int);
-
 /* When outputting delayed branch sequences, this rtx holds the
    sequence being output.  It is null when no delayed branch
    sequence is being output, so it can be used as a test in the

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