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]

ASM_COMMENT_START?


John David Anglin writes:
 > 2003-10-21  Andrew Haley  <aph@redhat.com>
 > 
 >         * varasm.c (output_constructor): Annotate constructor.
 > 
 > gcc -c   -g  -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -fno-common   -DHAVE_CONFIG_H    -I. -I. -I../../gcc/gcc -I../../gcc/gcc/. -I../../gcc/gcc/../include  ../../gcc/gcc/varasm.c -o varasm.o
 > ../../gcc/gcc/varasm.c: In function `output_constructor':
 > ../../gcc/gcc/varasm.c:3936: error: `ASM_COMMENT_START' undeclared (first use in this function)
 > 
 > Is it now mandatory to define `ASM_COMMENT_START'?

I saw it used unconditionally, so I thought it must be.

Ah, I see this in final.c:

/* How to start an assembler comment.  */
#ifndef ASM_COMMENT_START
#define ASM_COMMENT_START ";#"
#endif

Maybe this ought to be in a header file somewhere?  Anyway, I've
committed this fix as obvious.

Andrew.


2003-10-22  Andrew Haley  <aph@redhat.com>

	* varasm.c (output_constructor): Make constructor annotation
	conditional on ASM_COMMENT_START.

Index: varasm.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/varasm.c,v
retrieving revision 1.392
diff -u -r1.392 varasm.c
--- varasm.c	21 Oct 2003 15:32:27 -0000	1.392
+++ varasm.c	22 Oct 2003 09:46:37 -0000
@@ -3931,12 +3931,14 @@
       else if (TREE_CODE (type) == ARRAY_TYPE)
 	index = TREE_PURPOSE (link);
 
+#ifdef ASM_COMMENT_START
       if (field && flag_verbose_asm)
 	fprintf (asm_out_file, "%s %s:\n",
 		 ASM_COMMENT_START, 
 		 DECL_NAME (field) 
 		 ? IDENTIFIER_POINTER (DECL_NAME (field))
 		 : "<anonymous>");
+#endif
 
       /* Eliminate the marker that makes a cast not be an lvalue.  */
       if (val != 0)


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