Commit 0a336522 by Kaveh R. Ghazi Committed by Kaveh Ghazi

aix.h (ASM_GENERATE_INTERNAL_LABEL): Fix format specifier.

	* rs6000/aix.h (ASM_GENERATE_INTERNAL_LABEL): Fix format specifier.

	* xcoffout.c (assign_type_number): Constify.
	(xcoffout_source_file): Add static prototype.  Don't needlessly
	cast away const-ness.

From-SVN: r34866
parent 55f972a4
2000-07-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* rs6000/aix.h (ASM_GENERATE_INTERNAL_LABEL): Fix format specifier.
* xcoffout.c (assign_type_number): Constify.
(xcoffout_source_file): Add static prototype. Don't needlessly
cast away const-ness.
2000-07-04 Jason Merrill <jason@redhat.com> 2000-07-04 Jason Merrill <jason@redhat.com>
* frame.h (frame_state): Move base_offset to end. * frame.h (frame_state): Move base_offset to end.
......
...@@ -462,7 +462,7 @@ toc_section () \ ...@@ -462,7 +462,7 @@ toc_section () \
This is suitable for output with `assemble_name'. */ This is suitable for output with `assemble_name'. */
#define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \ #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \
sprintf (LABEL, "*%s..%d", PREFIX, NUM) sprintf (LABEL, "*%s..%ld", (PREFIX), (long)(NUM))
/* This is how to output an assembler line to define N characters starting /* This is how to output an assembler line to define N characters starting
at P to FILE. */ at P to FILE. */
......
...@@ -117,8 +117,9 @@ const char *xcoff_lastfile; ...@@ -117,8 +117,9 @@ const char *xcoff_lastfile;
#define ASM_OUTPUT_LBE(FILE,LINENUM,BLOCKNUM) \ #define ASM_OUTPUT_LBE(FILE,LINENUM,BLOCKNUM) \
fprintf (FILE, "\t.eb\t%d\n", ABS_OR_RELATIVE_LINENO (LINENUM)) fprintf (FILE, "\t.eb\t%d\n", ABS_OR_RELATIVE_LINENO (LINENUM))
static void assign_type_number PARAMS ((tree, char *, int)); static void assign_type_number PARAMS ((tree, const char *, int));
static void xcoffout_block PARAMS ((tree, int, tree)); static void xcoffout_block PARAMS ((tree, int, tree));
static void xcoffout_source_file PARAMS ((FILE *, const char *, int));
/* Support routines for XCOFF debugging info. */ /* Support routines for XCOFF debugging info. */
...@@ -128,7 +129,7 @@ static void xcoffout_block PARAMS ((tree, int, tree)); ...@@ -128,7 +129,7 @@ static void xcoffout_block PARAMS ((tree, int, tree));
static void static void
assign_type_number (syms, name, number) assign_type_number (syms, name, number)
tree syms; tree syms;
char *name; const char *name;
int number; int number;
{ {
tree decl; tree decl;
...@@ -326,7 +327,7 @@ stab_to_sclass (stab) ...@@ -326,7 +327,7 @@ stab_to_sclass (stab)
/* Output debugging info to FILE to switch to sourcefile FILENAME. /* Output debugging info to FILE to switch to sourcefile FILENAME.
INLINE_P is true if this is from an inlined function. */ INLINE_P is true if this is from an inlined function. */
void static void
xcoffout_source_file (file, filename, inline_p) xcoffout_source_file (file, filename, inline_p)
FILE *file; FILE *file;
const char *filename; const char *filename;
...@@ -462,19 +463,19 @@ xcoffout_declare_function (file, decl, name) ...@@ -462,19 +463,19 @@ xcoffout_declare_function (file, decl, name)
tree decl; tree decl;
const char *name; const char *name;
{ {
char *n = (char *) name;
int i; int i;
if (*n == '*') if (*name == '*')
n++; name++;
else else
for (i = 0; name[i]; ++i) for (i = 0; name[i]; ++i)
{ {
if (name[i] == '[') if (name[i] == '[')
{ {
n = (char *) alloca (i + 1); char *n = (char *) alloca (i + 1);
strncpy (n, name, i); strncpy (n, name, i);
n[i] = '\0'; n[i] = '\0';
name = n;
break; break;
} }
} }
...@@ -487,7 +488,8 @@ xcoffout_declare_function (file, decl, name) ...@@ -487,7 +488,8 @@ xcoffout_declare_function (file, decl, name)
/* .function NAME, TOP, MAPPING, TYPE, SIZE /* .function NAME, TOP, MAPPING, TYPE, SIZE
16 and 044 are placeholders for backwards compatibility */ 16 and 044 are placeholders for backwards compatibility */
fprintf (file, "\t.function .%s,.%s,16,044,FE..%s-.%s\n", n, n, n, n); fprintf (file, "\t.function .%s,.%s,16,044,FE..%s-.%s\n",
name, name, name, name);
} }
/* Called at beginning of function body (after prologue). /* Called at beginning of function body (after prologue).
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment