* messages.c (as_fatal): Do mention that it's the assembler that

got the fatal error.
This commit is contained in:
Ken Raeburn 1993-10-11 20:17:28 +00:00
parent 7da354f4ac
commit 8d3be8030e
2 changed files with 53 additions and 11 deletions

View File

@ -1,3 +1,8 @@
Mon Oct 11 16:14:43 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
* messages.c (as_fatal): Do mention that it's the assembler that
got the fatal error.
Fri Oct 8 14:09:35 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
* config/tc-mips.c (mips_gprmask, mips_cprmask): New variables to

View File

@ -36,6 +36,8 @@
#endif /* NO_VARARGS */
#endif /* NO_STDARG */
extern char *strerror ();
/*
* Despite the rest of the comments in this file, (FIXME-SOON),
* here is the current scheme for error messages etc:
@ -128,10 +130,6 @@ as_perror (gripe, filename)
char *gripe; /* Unpunctuated error theme. */
char *filename;
{
#ifndef HAVE_STRERROR
extern char *strerror ();
#endif /* HAVE_STRERROR */
as_where ();
fprintf (stderr, gripe, filename);
fprintf (stderr, ": %s\n", strerror (errno));
@ -206,7 +204,7 @@ as_warn (const char *Format,...)
va_list args;
char buffer[200];
if (!flagseen['W'])
if (!flag_suppress_warnings)
{
++warning_count;
as_where ();
@ -232,7 +230,7 @@ as_warn (Format, va_alist)
va_list args;
char buffer[200];
if (!flagseen['W'])
if (!flag_suppress_warnings)
{
++warning_count;
as_where ();
@ -253,8 +251,7 @@ as_warn (Format, va_alist)
as_warn (Format, args)
char *Format;
{
/* -W supresses warning messages. */
if (!flagseen['W'])
if (!flag_suppress_warnings)
{
++warning_count;
as_where ();
@ -354,7 +351,7 @@ as_fatal (const char *Format,...)
as_where ();
va_start (args, Format);
fprintf (stderr, "FATAL:");
fprintf (stderr, "Assembler fatal error:");
vfprintf (stderr, Format, args);
(void) putc ('\n', stderr);
va_end (args);
@ -372,7 +369,7 @@ as_fatal (Format, va_alist)
as_where ();
va_start (args);
fprintf (stderr, "FATAL:");
fprintf (stderr, "Assembler fatal error:");
vfprintf (stderr, Format, args);
(void) putc ('\n', stderr);
va_end (args);
@ -385,7 +382,7 @@ as_fatal (Format, args)
char *Format;
{
as_where ();
fprintf (stderr, "FATAL:");
fprintf (stderr, "Assembler fatal error:");
_doprnt (Format, &args, stderr);
(void) putc ('\n', stderr);
/* as_where(); */
@ -395,4 +392,44 @@ as_fatal (Format, args)
#endif /* not NO_VARARGS */
#endif /* not NO_STDARG */
void
fprint_value (file, val)
FILE *file;
valueT val;
{
if (sizeof (val) <= sizeof (long))
{
fprintf (file, "%ld", val);
return;
}
#ifdef BFD_ASSEMBLER
if (sizeof (val) <= sizeof (bfd_vma))
{
fprintf_vma (file, val);
return;
}
#endif
abort ();
}
void
sprint_value (buf, val)
char *buf;
valueT val;
{
if (sizeof (val) <= sizeof (long))
{
sprintf (buf, "%ld", val);
return;
}
#ifdef BFD_ASSEMBLER
if (sizeof (val) <= sizeof (bfd_vma))
{
sprintf_vma (buf, val);
return;
}
#endif
abort ();
}
/* end of messages.c */