This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: as error output not -j64 safe
- From: Mike Stump <mikestump at comcast dot net>
- To: Alan Modra <amodra at gmail dot com>
- Cc: Matthew Fortune <Matthew dot Fortune at imgtec dot com>, Andrew Pinski <pinskia at gmail dot com>, binutils <binutils at sourceware dot org>, Richard Sandiford <rdsandiford at googlemail dot com>
- Date: Thu, 22 May 2014 01:09:52 -0700
- Subject: Re: as error output not -j64 safe
- Authentication-results: sourceware.org; auth=none
- References: <819223B1-7BDF-46C0-80CE-EF49878BA3C8 at comcast dot net> <CA+=Sn1m3VExcetsFHU62+aKDbQYyZTJjYjX1UE0KfovhwyhyXw at mail dot gmail dot com> <36FD025D-0FE1-4248-A154-E28F998F5B73 at comcast dot net> <20140516085119 dot GW5162 at bubble dot grove dot modra dot org> <F49F0B3C-666F-435A-AD35-7906944F6D0D at comcast dot net> <6D39441BF12EF246A7ABCE6654B02353539192 at LEMAIL01 dot le dot imgtec dot org> <6D39441BF12EF246A7ABCE6654B02353539325 at LEMAIL01 dot le dot imgtec dot org> <9C4FC4FE-EE53-48FA-A599-E03DE182149D at comcast dot net> <20140522072144 dot GB5162 at bubble dot grove dot modra dot org>
On May 22, 2014, at 12:21 AM, Alan Modra <amodra@gmail.com> wrote:
> I don't think it matters. We have "Error:" and "Warning:" already in
> listing.c, so that should match.
>
> Hmm, that means in listings we print
>
> Error:blahblahblah
> Life isn't perfect. :)
It can be. Try this out, if it tests out ok, either check it in (or let me know and I can).
diff --git a/gas/listing.c b/gas/listing.c
index 24450cf..69db6d2 100644
--- a/gas/listing.c
+++ b/gas/listing.c
@@ -234,10 +234,11 @@ listing_message (const char *name, const char *message)
{
if (listing_tail != (list_info_type *) NULL)
{
- unsigned int l = strlen (name) + strlen (message) + 1;
+ unsigned int l = strlen (name) + 1 + strlen (message) + 1;
char *n = (char *) xmalloc (l);
struct list_message *lm = xmalloc (sizeof *lm);
strcpy (n, name);
+ strcat (n, " ");
strcat (n, message);
lm->message = n;
lm->next = NULL;