X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gas%2Fmessages.c;h=bbe181bbc9f5db5e8aaf6df3dda5977137036e35;hb=9d1416696615c74b8316739150d03ed7f95f2e11;hp=b1b94cdf7c6eccf118be48e11a6a16ad0fbe3deb;hpb=6d74f28b36e29b8708881b60e2e6505047813b0b;p=deliverable%2Fbinutils-gdb.git diff --git a/gas/messages.c b/gas/messages.c index b1b94cdf7c..bbe181bbc9 100644 --- a/gas/messages.c +++ b/gas/messages.c @@ -1,12 +1,12 @@ /* messages.c - error reporter - Copyright 1987, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 2000, 2001, - 2003, 2004, 2005 + 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. GAS is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) + the Free Software Foundation; either version 3, or (at your option) any later version. GAS is distributed in the hope that it will be useful, @@ -116,24 +116,6 @@ as_show_where (void) fprintf (stderr, "%s:%u: ", file, line); } -/* Like perror(3), but with more info. */ - -void -as_perror (const char *gripe, /* Unpunctuated error theme. */ - const char *filename) -{ - const char *errtxt; - int saved_errno = errno; - - as_show_where (); - fprintf (stderr, gripe, filename); - errno = saved_errno; - errtxt = bfd_errmsg (bfd_get_error ()); - fprintf (stderr, ": %s\n", errtxt); - errno = 0; - bfd_set_error (bfd_error_no_error); -} - /* Send to stderr a string as a warning, and locate warning in input file(s). Please only use this for when we have some recovery action. @@ -474,6 +456,24 @@ as_internal_value_out_of_range (char * prefix, if (prefix == NULL) prefix = ""; + if (val >= min && val <= max) + { + addressT right = max & -max; + + if (max <= 1) + abort (); + + /* xgettext:c-format */ + err = _("%s out of domain (%d is not a multiple of %d)"); + if (bad) + as_bad_where (file, line, err, + prefix, (int) val, (int) right); + else + as_warn_where (file, line, err, + prefix, (int) val, (int) right); + return; + } + if ( val < HEX_MAX_THRESHOLD && min < HEX_MAX_THRESHOLD && max < HEX_MAX_THRESHOLD