+2001-08-01 Alan Modra <amodra@bigpond.net.au>
+
+ * read.c: Standardize error/warning messages - don't capitalise, no
+ final period or newline, don't say "ignored" or "zero assumed" for
+ as_bad messages. In some cases, change the wording to that used
+ elsewhere for similar messages.
+ * app.c: Likewise.
+ * as.c: Likewise.
+ * atof-generic.c: Likewise.
+ * cgen.c: Likewise.
+ * cond.c: Likewise.
+ * depend.c: Likewise.
+ * dwarf2dbg.c: Likewise.
+ * ecoff.c: Likewise.
+ * expr.c: Likewise.
+ * frags.c: Likewise.
+ * input-file.c: Likewise.
+ * input-scrub.c: Likewise.
+ * listing.c: Likewise.
+ * output-file.c: Likewise.
+ * stabs.c: Likewise.
+ * subsegs.c: Likewise.
+ * symbols.c: Likewise.
+ * write.c: Likewise.
+ * ecoff.c (ecoff_directive_end): Test for missing name by
+ comparing input line pointers rather than reading string.
+ (ecoff_directive_ent): Likewise.
+ * read.c (s_set): Likewise.
+ (s_align): Report a warning rather than an error for
+ alignment too large.
+ (s_comm): Check for missing symbol name.
+ (s_lcomm_internal): Likewise.
+ (s_lsym): Likewise.
+ (s_globl): Use is_end_of_line instead of looking for '\n'.
+ (s_lcomm_internal): Likewise.
+ (ignore_rest_of_line): Report a warning rather than an error.
+
2001-07-31 Geoffrey Keating <geoffk@redhat.com>
* config/tc-ppc.c (ppc_elf_validate_fix): It's OK to have
ch = GET ();
if (ch == EOF)
{
- as_warn (_("end of file in string: inserted '\"'"));
+ as_warn (_("end of file in string; inserted '\"'"));
state = old_state;
UNGET ('\n');
PUT ('"');
break;
#if defined(IGNORE_NONSTANDARD_ESCAPES) | defined(ONLY_STANDARD_ESCAPES)
default:
- as_warn (_("Unknown escape '\\%c' in string: Ignored"), ch);
+ as_warn (_("unknown escape '\\%c' in string; ignored"), ch);
break;
#else /* ONLY_STANDARD_ESCAPES */
default:
#endif /* ONLY_STANDARD_ESCAPES */
case EOF:
- as_warn (_("End of file in string: '\"' inserted"));
+ as_warn (_("end of file in string; '\"' inserted"));
PUT ('"');
continue;
}
if ((ch = GET ()) != '\'')
{
#ifdef REQUIRE_CHAR_CLOSE_QUOTE
- as_warn (_("Missing close quote: (assumed)"));
+ as_warn (_("missing close quote; (assumed)"));
#else
if (ch != EOF)
UNGET (ch);
while (ch != EOF && !IS_NEWLINE (ch))
ch = GET ();
if (ch == EOF)
- as_warn (_("EOF in Comment: Newline inserted"));
+ as_warn (_("end of file in comment; newline inserted"));
state = 0;
PUT ('\n');
break;
if (optarg == NULL)
{
- as_warn (_("No file name following -t option\n"));
+ as_warn (_("no file name following -t option"));
break;
}
internal table. */
itbl_files->name = xstrdup (optarg);
if (itbl_parse (itbl_files->name) != 0)
- {
- fprintf (stderr, _("Failed to read instruction table %s\n"),
- itbl_files->name);
- exit (EXIT_SUCCESS);
- }
+ as_fatal (_("failed to read instruction table %s\n"),
+ itbl_files->name);
}
break;
* We have a GROSS internal error.
* This should never happen.
*/
- as_fatal (_("failed sanity check."));
+ as_fatal (_("failed sanity check"));
}
}
else
{
if (i < 0 || i >= MAX_SAVED_FIXUP_CHAINS)
{
- as_fatal("Index into stored_fixups[] out of bounds.");
+ as_fatal("index into stored_fixups[] out of bounds");
return;
}
stored_fixups[i].num_fixups_in_chain = num_fixups;
{
if (i < 0 || i >= MAX_SAVED_FIXUP_CHAINS)
{
- as_fatal("Index into stored_fixups[] out of bounds.");
+ as_fatal("index into stored_fixups[] out of bounds");
return;
}
num_fixups = stored_fixups[i].num_fixups_in_chain;
if (i < 0 || i >= MAX_SAVED_FIXUP_CHAINS)
{
- as_fatal("Index into stored_fixups[] out of bounds.");
+ as_fatal("index into stored_fixups[] out of bounds");
return;
}
{
if (current_cframe == NULL)
{
- as_bad (_("\".elseif\" without matching \".if\" - ignored"));
+ as_bad (_("\".elseif\" without matching \".if\""));
}
else if (current_cframe->else_seen)
{
- as_bad (_("\".elseif\" after \".else\" - ignored"));
+ as_bad (_("\".elseif\" after \".else\""));
as_bad_where (current_cframe->else_file_line.file,
current_cframe->else_file_line.line,
_("here is the previous \"else\""));
{
if (current_cframe == NULL)
{
- as_bad (_(".else without matching .if - ignored"));
+ as_bad (_("\".else\" without matching \".if\""));
}
else if (current_cframe->else_seen)
{
- as_bad (_("duplicate \"else\" - ignored"));
+ as_bad (_("duplicate \"else\""));
as_bad_where (current_cframe->else_file_line.file,
current_cframe->else_file_line.line,
_("here is the previous \"else\""));
f = fopen (dep_file, FOPEN_WT);
if (f == NULL)
{
- as_warn (_("Can't open `%s' for writing"), dep_file);
+ as_warn (_("can't open `%s' for writing"), dep_file);
return;
}
putc ('\n', f);
if (fclose (f))
- as_warn (_("Can't close `%s'"), dep_file);
+ as_warn (_("can't close `%s'"), dep_file);
}
if (num < 1)
{
- as_bad (_("File number less than one"));
+ as_bad (_("file number less than one"));
return;
}
if (num < files_in_use && files[num].filename != 0)
{
- as_bad (_("File number %ld already allocated"), (long) num);
+ as_bad (_("file number %ld already allocated"), (long) num);
return;
}
if (filenum < 1)
{
- as_bad (_("File number less than one"));
+ as_bad (_("file number less than one"));
return;
}
if (filenum >= (int) files_in_use || files[filenum].filename == 0)
{
- as_bad (_("Unassigned file number %ld"), (long) filenum);
+ as_bad (_("unassigned file number %ld"), (long) filenum);
return;
}
{
if (files[i].filename == NULL)
{
- as_bad (_("Unassigned file number %u"), i);
+ as_bad (_("unassigned file number %ld"), (long) i);
continue;
}
register shash_t *hash_ptr;
if (len >= PAGE_USIZE)
- as_fatal (_("String too big (%lu bytes)"), len);
+ as_fatal (_("string too big (%lu bytes)"), len);
hash_ptr = (shash_t *) hash_find (hash_tbl, str);
if (hash_ptr == (shash_t *) NULL)
err = hash_insert (hash_tbl, str, (char *) hash_ptr);
if (err)
- as_fatal (_("Inserting \"%s\" into string hash table: %s"),
+ as_fatal (_("inserting \"%s\" into string hash table: %s"),
str, err);
}
hash_ptr = allocate_shash ();
err = hash_insert (tag_hash, perm, (char *) hash_ptr);
if (err)
- as_fatal (_("Inserting \"%s\" into tag hash table: %s"),
+ as_fatal (_("inserting \"%s\" into tag hash table: %s"),
tag, err);
hash_ptr->string = perm;
}
(shash_t **)0);
if (strlen (file_name) > PAGE_USIZE - 2)
- as_fatal (_("Filename goes over one page boundary."));
+ as_fatal (_("filename goes over one page boundary"));
/* Push the start of the filename. We assume that the filename
will be stored at string offset 1. */
if (coff_sym_name != (char *) NULL)
as_warn (_(".def pseudo-op used inside of .def/.endef; ignored"));
else if (*name == '\0')
- as_warn (_("Empty symbol name in .def; ignored"));
+ as_warn (_("empty symbol name in .def; ignored"));
else
{
if (coff_sym_name != (char *) NULL)
{
if (*input_line_pointer != '\n'
&& *input_line_pointer != ';')
- as_warn (_("Badly formed .dim directive"));
+ as_warn (_("badly formed .dim directive"));
break;
}
}
{
if (coff_type.num_dims >= N_TQ)
{
- as_warn (_("Too many .dim entries"));
+ as_warn (_("too many .dim entries"));
break;
}
coff_type.dimensions[coff_type.num_dims] = dimens[i];
{
if (*input_line_pointer != '\n'
&& *input_line_pointer != ';')
- as_warn (_("Badly formed .size directive"));
+ as_warn (_("badly formed .size directive"));
break;
}
}
{
if (coff_type.num_sizes >= N_TQ)
{
- as_warn (_("Too many .size entries"));
+ as_warn (_("too many .size entries"));
break;
}
coff_type.sizes[coff_type.num_sizes] = sizes[i];
/* FIXME: We could handle this by setting the continued bit.
There would still be a limit: the .type argument can not
be infinite. */
- as_warn (_("The type of %s is too complex; it will be simplified"),
+ as_warn (_("the type of %s is too complex; it will be simplified"),
coff_sym_name);
break;
}
if (coff_type.num_sizes != 1 || diff < 0)
{
- as_warn (_("Bad COFF debugging info"));
+ as_warn (_("bad COFF debugging information"));
return;
}
{
if (coff_tag == (char *) NULL)
{
- as_warn (_("No tag specified for %s"), name);
+ as_warn (_("no tag specified for %s"), name);
return;
}
if (coff_type.num_sizes - coff_type.num_dims - coff_type.extra_sizes
!= 1)
{
- as_warn (_("Bad COFF debugging information"));
+ as_warn (_("bad COFF debugging information"));
return;
}
else
{
char *name;
char name_end;
- register int ch;
symbolS *ent;
if (cur_file_ptr == (efdr_t *) NULL)
name = input_line_pointer;
name_end = get_symbol_end ();
- ch = *name;
- if (! is_name_beginner (ch))
+ if (name == input_line_pointer)
{
as_warn (_(".end directive has no name"));
*input_line_pointer = name_end;
{
char *name;
char name_end;
- register int ch;
if (cur_file_ptr == (efdr_t *) NULL)
add_file ((const char *) NULL, 0, 1);
name = input_line_pointer;
name_end = get_symbol_end ();
- ch = *name;
- if (! is_name_beginner (ch))
+ if (name == input_line_pointer)
{
as_warn (_(".ent directive has no name"));
*input_line_pointer = name_end;
if (cur_proc_ptr != (proc_t *) NULL)
{
- as_warn (_("No way to handle .file within .ent/.end section"));
+ as_warn (_("no way to handle .file within .ent/.end section"));
demand_empty_rest_of_line ();
return;
}
if (get_absolute_expression_and_terminator (&val) != ',')
{
- as_warn (_("Bad .fmask directive"));
+ as_warn (_("bad .fmask directive"));
--input_line_pointer;
demand_empty_rest_of_line ();
return;
if (*input_line_pointer++ != ','
|| get_absolute_expression_and_terminator (&val) != ',')
{
- as_warn (_("Bad .frame directive"));
+ as_warn (_("bad .frame directive"));
--input_line_pointer;
demand_empty_rest_of_line ();
return;
if (get_absolute_expression_and_terminator (&val) != ',')
{
- as_warn (_("Bad .mask directive"));
+ as_warn (_("bad .mask directive"));
--input_line_pointer;
demand_empty_rest_of_line ();
return;
{
if (S_IS_DEFINED (symbolP))
{
- as_bad (_("Ignoring attempt to redefine symbol `%s'."),
+ as_bad (_("symbol `%s' is already defined"),
S_GET_NAME (symbolP));
ignore_rest_of_line ();
return;
dummy_symr.index = desc;
if (dummy_symr.index != desc)
{
- as_warn (_("Line number (%d) for .stab%c directive cannot fit in index field (20 bits)"),
+ as_warn (_("line number (%d) for .stab%c directive cannot fit in index field (20 bits)"),
desc, what);
return;
}
}
else if (! is_name_beginner ((unsigned char) *input_line_pointer))
{
- as_warn (_("Illegal .stab%c directive, bad character"), what);
+ as_warn (_("illegal .stab%c directive, bad character"), what);
return;
}
else
if (S_IS_WEAK (sym))
{
if (S_IS_COMMON (sym))
- as_bad (_("Symbol `%s' can not be both weak and common"),
+ as_bad (_("symbol `%s' can not be both weak and common"),
S_GET_NAME (sym));
}
}
cur_file_ptr->cur_scope = cur_file_ptr->cur_scope->prev;
if (! end_warning && ! cur_file_ptr->fake)
{
- as_warn (_("Missing .end or .bend at end of file"));
+ as_warn (_("missing .end or .bend at end of file"));
end_warning = 1;
}
}
generic_floating_point_number or generic_bignum, and we are
going to lose it if we haven't already. */
if (expressionP->X_add_number > 0)
- as_bad (_("bignum invalid; zero assumed"));
+ as_bad (_("bignum invalid"));
else
- as_bad (_("floating point number invalid; zero assumed"));
+ as_bad (_("floating point number invalid"));
zero.X_op = O_constant;
zero.X_add_number = 0;
zero.X_unsigned = 0;
{
if (error_code == ERROR_EXPONENT_OVERFLOW)
{
- as_bad (_("bad floating-point constant: exponent overflow, probably assembling junk"));
+ as_bad (_("bad floating-point constant: exponent overflow"));
}
else
{
- as_bad (_("bad floating-point constant: unknown error code=%d."), error_code);
+ as_bad (_("bad floating-point constant: unknown error code=%d"),
+ error_code);
}
}
expressionP->X_op = O_big;
/* Check for 8 digit per word max. */
if (ndigit > 8)
- as_bad (_("A bignum with underscores may not have more than 8 hex digits in any word."));
+ as_bad (_("a bignum with underscores may not have more than 8 hex digits in any word"));
/* Add this chunk to the bignum.
Shift things down 2 little digits. */
assert (num_little_digits >= 4);
if (num_little_digits != 8)
- as_bad (_("A bignum with underscores must have exactly 4 words."));
+ as_bad (_("a bignum with underscores must have exactly 4 words"));
/* We might have some leading zeros. These can be trimmed to give
us a change to fit this constant into a small number. */
/* Either not seen or not defined. */
/* @@ Should print out the original string instead of
the parsed number. */
- as_bad (_("backw. ref to unknown label \"%d:\", 0 assumed."),
+ as_bad (_("backward ref to unknown label \"%d:\""),
(int) number);
expressionP->X_op = O_constant;
}
if (i < 0)
{
- as_bad (_("Character constant too large"));
+ as_bad (_("character constant too large"));
i = 0;
}
#ifdef RELAX_PAREN_GROUPING
if (c != '(')
#endif
- as_bad (_("Missing '%c' assumed"), c == '(' ? ')' : ']');
+ as_bad (_("missing '%c'"), c == '(' ? ')' : ']');
}
else
input_line_pointer++;
if (expressionP->X_op == O_absent)
{
++input_line_pointer;
- as_bad (_("Bad expression"));
+ as_bad (_("bad expression"));
expressionP->X_op = O_constant;
expressionP->X_add_number = 0;
}
frchain_now->frch_obstack.chunk_size = oldc;
}
if (obstack_room (&frchain_now->frch_obstack) < nchars)
- as_fatal (_("Can't extend frag %d. chars"), nchars);
+ as_fatal (_("can't extend frag %u chars"), nchars);
}
\f
/* Call this to close off a completed frag, and start up a new (empty)
}
if (f_in == (FILE *) 0)
{
- as_bad (_("Can't open %s for reading."), file_name);
+ as_bad (_("can't open %s for reading"), file_name);
as_perror ("%s", file_name);
return;
}
partial_where = 0;
if (partial_size > 0)
{
- as_warn (_("Partial line at end of file ignored"));
+ as_warn (_("partial line at end of file ignored"));
}
/* Tell the listing we've finished the file. */
}
else if (*input_line_pointer == '\n')
{
- as_bad (_("New line in title"));
+ as_bad (_("new line in title"));
demand_empty_rest_of_line ();
return;
}
char *name;
{
if (name[0] == '-' && name[1] == '\0')
- as_fatal (_("Can't open a bfd on stdout %s "), name);
+ as_fatal (_("can't open a bfd on stdout %s"), name);
else if (!(stdoutput = bfd_openw (name, TARGET_FORMAT)))
{
- as_perror (_("FATAL: Can't create %s"), name);
+ as_perror (_("FATAL: can't create %s"), name);
exit (EXIT_FAILURE);
}
if (bfd_close (stdoutput) == 0)
{
bfd_perror (filename);
- as_perror (_("FATAL: Can't close %s\n"), filename);
+ as_perror (_("FATAL: can't close %s\n"), filename);
exit (EXIT_FAILURE);
}
#else
/* Close the bfd without getting bfd to write out anything by itself. */
if (bfd_close_all_done (stdoutput) == 0)
{
- as_perror (_("FATAL: Can't close %s\n"), filename);
+ as_perror (_("FATAL: can't close %s\n"), filename);
exit (EXIT_FAILURE);
}
#endif
if (stdoutput == NULL)
{
- as_perror (_("FATAL: Can't create %s"), name);
+ as_perror (_("FATAL: can't create %s"), name);
exit (EXIT_FAILURE);
}
}
{
if (EOF == fclose (stdoutput))
{
- as_perror (_("FATAL: Can't close %s"), filename);
+ as_perror (_("FATAL: can't close %s"), filename);
exit (EXIT_FAILURE);
}
/* if ( EOF == (putc( *where, stdoutput )) ) */
{
as_perror (_("Failed to emit an object byte"), filename);
- as_fatal (_("Can't continue"));
+ as_fatal (_("can't continue"));
}
}
}
/* Print the error msg now, while we still can. */
if (pop == NULL)
{
- as_bad (_("Unknown pseudo-op: `%s'"), s);
+ as_bad (_("unknown pseudo-op: `%s'"), s);
*input_line_pointer = c;
s_ignore (0);
continue;
if (tc_unrecognized_line (c))
continue;
#endif
- /* as_warn (_("Junk character %d."),c); Now done by ignore_rest. */
- input_line_pointer--; /* Report unknown char as ignored. */
+ input_line_pointer--;
+ /* Report unknown char as ignored. */
ignore_rest_of_line ();
}
for (i = 0; (align & 1) == 0; align >>= 1, ++i)
;
if (align != 1)
- as_bad (_("Alignment not a power of 2"));
+ as_bad (_("alignment not a power of 2"));
align = i;
}
if (align > 15)
{
align = 15;
- as_bad (_("Alignment too large: %u assumed"), align);
+ as_warn (_("alignment too large: %u assumed"), align);
}
if (*input_line_pointer != ',')
/* Just after name is now '\0'. */
p = input_line_pointer;
*p = c;
+
+ if (name == p)
+ {
+ as_bad (_("expected symbol name"));
+ discard_rest_of_line ();
+ return;
+ }
+
SKIP_WHITESPACE ();
if (*input_line_pointer != ',')
{
- as_bad (_("Expected comma after symbol-name: rest of line ignored."));
+ *p = 0;
+ as_bad (_("expected comma after \"%s\""), name);
+ *p = c;
ignore_rest_of_line ();
if (flag_mri)
mri_comment_end (stop, stopc);
if ((temp = get_absolute_expression ()) < 0)
{
- as_warn (_(".COMMon length (%ld.) <0! Ignored."), (long) temp);
+ as_warn (_(".COMMon length (%ld) < 0 ignored"), (long) temp);
ignore_rest_of_line ();
if (flag_mri)
mri_comment_end (stop, stopc);
if (S_IS_DEFINED (symbolP) && !S_IS_COMMON (symbolP))
{
- as_bad (_("Ignoring attempt to re-define symbol `%s'."),
+ as_bad (_("symbol `%s' is already defined"),
S_GET_NAME (symbolP));
ignore_rest_of_line ();
if (flag_mri)
if (S_GET_VALUE (symbolP))
{
if (S_GET_VALUE (symbolP) != (valueT) temp)
- as_bad (_("Length of .comm \"%s\" is already %ld. Not changed to %ld."),
+ as_bad (_("length of .comm \"%s\" is already %ld; not changing to %ld"),
S_GET_NAME (symbolP),
(long) S_GET_VALUE (symbolP),
(long) temp);
if (S_IS_DEFINED (sym) && !S_IS_COMMON (sym))
{
- as_bad (_("attempt to re-define symbol `%s'"), S_GET_NAME (sym));
+ as_bad (_("symbol `%s' is already defined"), S_GET_NAME (sym));
ignore_rest_of_line ();
mri_comment_end (stop, stopc);
return;
if (l < 0)
/* Some of the back ends can't deal with non-positive line numbers.
Besides, it's silly. */
- as_warn (_("Line numbers must be positive; line number %d rejected."),
+ as_warn (_("line numbers must be positive; line number %d rejected"),
l + 1);
else
{
#define BSD_FILL_SIZE_CROCK_8 (8)
if (size > BSD_FILL_SIZE_CROCK_8)
{
- as_warn (_(".fill size clamped to %d."), BSD_FILL_SIZE_CROCK_8);
+ as_warn (_(".fill size clamped to %d"), BSD_FILL_SIZE_CROCK_8);
size = BSD_FILL_SIZE_CROCK_8;
}
if (size < 0)
{
- as_warn (_("Size negative: .fill ignored."));
+ as_warn (_("size negative; .fill ignored"));
size = 0;
}
else if (rep_exp.X_op == O_constant && rep_exp.X_add_number <= 0)
{
if (rep_exp.X_add_number < 0)
- as_warn (_("Repeat < 0, .fill ignored"));
+ as_warn (_("repeat < 0; .fill ignored"));
size = 0;
}
{
input_line_pointer++;
SKIP_WHITESPACE ();
- if (*input_line_pointer == '\n')
+ if (is_end_of_line[(unsigned char) *input_line_pointer])
c = '\n';
}
}
c = get_symbol_end ();
p = input_line_pointer;
*p = c;
+
+ if (name == p)
+ {
+ as_bad (_("expected symbol name"));
+ discard_rest_of_line ();
+ return;
+ }
+
SKIP_WHITESPACE ();
/* Accept an optional comma after the name. The comma used to be
SKIP_WHITESPACE ();
}
- if (*input_line_pointer == '\n')
+ if (is_end_of_line[(unsigned char) *input_line_pointer])
{
- as_bad (_("Missing size expression"));
+ as_bad (_("missing size expression"));
return;
}
if ((temp = get_absolute_expression ()) < 0)
{
- as_warn (_("BSS length (%d.) <0! Ignored."), temp);
+ as_warn (_("BSS length (%d) < 0 ignored"), temp);
ignore_rest_of_line ();
return;
}
if (*input_line_pointer != ',')
{
- as_bad (_("Expected comma after size"));
+ as_bad (_("expected comma after size"));
ignore_rest_of_line ();
return;
}
input_line_pointer++;
SKIP_WHITESPACE ();
- if (*input_line_pointer == '\n')
+ if (is_end_of_line[(unsigned char) *input_line_pointer])
{
- as_bad (_("Missing alignment"));
+ as_bad (_("missing alignment"));
return;
}
for (i = 0; (align & 1) == 0; align >>= 1, ++i)
;
if (align != 1)
- as_bad (_("Alignment not a power of 2"));
+ as_bad (_("alignment not a power of 2"));
align = i;
}
}
if (align > max_alignment)
{
align = max_alignment;
- as_warn (_("Alignment too large: %d. assumed."), align);
+ as_warn (_("alignment too large; %d assumed"), align);
}
else if (align < 0)
{
align = 0;
- as_warn (_("Alignment negative. 0 assumed."));
+ as_warn (_("alignment negative; 0 assumed"));
}
record_alignment (bss_seg, align);
#endif
}
else
- as_bad (_("Ignoring attempt to re-define symbol `%s'."),
- S_GET_NAME (symbolP));
+ as_bad (_("symbol `%s' is already defined"), S_GET_NAME (symbolP));
subseg_set (current_seg, current_subseg);
c = get_symbol_end ();
p = input_line_pointer;
*p = c;
+
+ if (name == p)
+ {
+ as_bad (_("expected symbol name"));
+ discard_rest_of_line ();
+ return;
+ }
+
SKIP_WHITESPACE ();
if (*input_line_pointer != ',')
{
*p = 0;
- as_bad (_("Expected comma after name \"%s\""), name);
+ as_bad (_("expected comma after \"%s\""), name);
*p = c;
ignore_rest_of_line ();
return;
}
else
{
- as_bad (_("Symbol %s already defined"), name);
+ as_bad (_("symbol `%s' is already defined"), name);
}
*p = c;
int fill;
{
if (segment != now_seg && segment != absolute_section)
- as_bad (_("invalid segment \"%s\"; segment \"%s\" assumed"),
- segment_name (segment), segment_name (now_seg));
+ as_bad (_("invalid segment \"%s\""), segment_name (segment));
if (now_seg == absolute_section)
{
name = input_line_pointer;
delim = get_symbol_end ();
end_name = input_line_pointer;
+ *end_name = delim;
- if (name[0] == '\0')
+ if (name == end_name)
{
as_bad (_("expected symbol name"));
- *end_name = delim;
discard_rest_of_line ();
return;
}
- *end_name = delim;
SKIP_WHITESPACE ();
if (*input_line_pointer != ',')
{
*end_name = 0;
- as_bad (_("Expected comma after name \"%s\""), name);
+ as_bad (_("expected comma after \"%s\""), name);
*end_name = delim;
ignore_rest_of_line ();
return;
if (equiv
&& S_IS_DEFINED (symbolP)
&& S_GET_SEGMENT (symbolP) != reg_section)
- as_bad (_("symbol `%s' already defined"), S_GET_NAME (symbolP));
+ as_bad (_("symbol `%s' is already defined"), S_GET_NAME (symbolP));
pseudo_set (symbolP);
demand_empty_rest_of_line ();
|| (mult != 0 && mult != 1 && val.X_add_number != 0))
{
if (exp.X_op != O_constant)
- as_bad (_("Unsupported variable size or fill value"));
+ as_bad (_("unsupported variable size or fill value"));
else
{
offsetT i;
know (flen > 0);
if (err)
{
- as_bad (_("Bad floating literal: %s"), err);
+ as_bad (_("bad floating literal: %s"), err);
ignore_rest_of_line ();
if (flag_mri)
mri_comment_end (stop, stopc);
if (!is_end_of_line[(unsigned char) *input_line_pointer])
{
if (isprint ((unsigned char) *input_line_pointer))
- as_bad (_("Rest of line ignored. First ignored character is `%c'."),
- *input_line_pointer);
+ as_warn (_("rest of line ignored; first ignored character is `%c'"),
+ *input_line_pointer);
else
- as_bad (_("Rest of line ignored. First ignored character valued 0x%x."),
- *input_line_pointer);
+ as_warn (_("rest of line ignored; first ignored character valued 0x%x"),
+ *input_line_pointer);
while (input_line_pointer < buffer_limit
&& !is_end_of_line[(unsigned char) *input_line_pointer])
(void) expression (&exp);
if (exp.X_op == O_illegal)
- as_bad (_("illegal expression; zero assumed"));
+ as_bad (_("illegal expression"));
else if (exp.X_op == O_absent)
- as_bad (_("missing expression; zero assumed"));
+ as_bad (_("missing expression"));
else if (exp.X_op == O_big)
{
if (exp.X_add_number > 0)
- as_bad (_("bignum invalid; zero assumed"));
+ as_bad (_("bignum invalid"));
else
- as_bad (_("floating point number invalid; zero assumed"));
+ as_bad (_("floating point number invalid"));
}
else if (exp.X_op == O_subtract
&& (S_GET_SEGMENT (exp.X_add_symbol)
|| exp.X_add_number != 0)
symbol_set_value_expression (symbolP, &exp);
else if (symbol_section_p (symbolP))
- as_bad ("invalid attempt to set value of section symbol");
+ as_bad ("attempt to set value of section symbol");
else
{
symbolS *s = exp.X_add_symbol;
}
else if (op == O_big && exp->X_add_number <= 0)
{
- as_bad (_("floating point number invalid; zero assumed"));
+ as_bad (_("floating point number invalid"));
exp->X_add_number = 0;
op = O_constant;
}
&& ((get & mask) != mask
|| (get & hibit) == 0))
{ /* Leading bits contain both 0s & 1s. */
- as_warn (_("Value 0x%lx truncated to 0x%lx."),
+ as_warn (_("value 0x%lx truncated to 0x%lx"),
(unsigned long) get, (unsigned long) use);
}
/* Put bytes in right order. */
size = exp->X_add_number * CHARS_PER_LITTLENUM;
if (nbytes < size)
{
- as_warn (_("Bignum truncated to %d bytes"), nbytes);
+ as_warn (_("bignum truncated to %d bytes"), nbytes);
size = nbytes;
}
if (count.X_op != O_constant
|| count.X_add_number <= 0)
{
- as_warn (_("Unresolvable or nonpositive repeat count; using 1"));
+ as_warn (_("unresolvable or nonpositive repeat count; using 1"));
return;
}
break;
default:
- as_bad (_("Unknown floating type type '%c'"), float_type);
+ as_bad (_("unknown floating type type '%c'"), float_type);
return -1;
}
if (i >= length)
{
- as_warn (_("Floating point constant too large"));
+ as_warn (_("floating point constant too large"));
return -1;
}
d = hex_value (*input_line_pointer) << 4;
know (length > 0);
if (err)
{
- as_bad (_("Bad floating literal: %s"), err);
+ as_bad (_("bad floating literal: %s"), err);
ignore_rest_of_line ();
return;
}
}
else if (op == O_big && exp->X_add_number <= 0)
{
- as_bad (_("floating point number invalid; zero assumed"));
+ as_bad (_("floating point number invalid"));
exp->X_add_number = 0;
op = O_constant;
}
FRAG_APPEND_1_CHAR (c);
if (*input_line_pointer != '>')
{
- as_bad (_("Expected <nn>"));
+ as_bad (_("expected <nn>"));
}
input_line_pointer++;
break;
break;
case '\n':
- as_warn (_("Unterminated string: Newline inserted."));
+ as_warn (_("unterminated string; newline inserted"));
bump_line_counters ();
break;
case '\n':
/* To be compatible with BSD 4.2 as: give the luser a linefeed!! */
- as_warn (_("Unterminated string: Newline inserted."));
+ as_warn (_("unterminated string; newline inserted"));
c = '\n';
bump_line_counters ();
break;
default:
#ifdef ONLY_STANDARD_ESCAPES
- as_bad (_("Bad escaped character in string, '?' assumed"));
+ as_bad (_("bad escaped character in string"));
c = '?';
#endif /* ONLY_STANDARD_ESCAPES */
|| expP->X_op == O_absent
|| expP->X_op == O_big)
{
- as_bad (_("expected address expression; zero assumed"));
+ as_bad (_("expected address expression"));
expP->X_op = O_constant;
expP->X_add_number = 0;
retval = absolute_section;
if (exp.X_op != O_constant)
{
if (exp.X_op != O_absent)
- as_bad (_("bad or irreducible absolute expression; zero assumed"));
+ as_bad (_("bad or irreducible absolute expression"));
exp.X_add_number = 0;
}
return exp.X_add_number;
s = 0;
len = 1;
*len_pointer = 0;
- as_bad (_("This string may not contain \'\\0\'"));
+ as_bad (_("this string may not contain \'\\0\'"));
}
}
}
}
else
{
- as_warn (_("Missing string"));
+ as_warn (_("missing string"));
retval = NULL;
ignore_rest_of_line ();
}
if (!reassign
&& S_IS_DEFINED (symbolP)
&& S_GET_SEGMENT (symbolP) != reg_section)
- as_bad (_("symbol `%s' already defined"), S_GET_NAME (symbolP));
+ as_bad (_("symbol `%s' is already defined"), S_GET_NAME (symbolP));
#ifdef OBJ_COFF
/* "set" symbols are local unless otherwise specified. */
input_line_pointer++;
else
{
- as_warn (_(".stabs: Missing comma"));
+ as_warn (_(".stab%c: missing comma"), what);
ignore_rest_of_line ();
return;
}
if (get_absolute_expression_and_terminator (&longint) != ',')
{
- as_warn (_(".stab%c: Missing comma"), what);
+ as_warn (_(".stab%c: missing comma"), what);
ignore_rest_of_line ();
return;
}
if (get_absolute_expression_and_terminator (&longint) != ',')
{
- as_warn (_(".stab%c: Missing comma"), what);
+ as_warn (_(".stab%c: missing comma"), what);
ignore_rest_of_line ();
return;
}
{
if (*input_line_pointer != ',')
{
- as_warn (_(".stab%c: Missing comma"), what);
+ as_warn (_(".stab%c: missing comma"), what);
ignore_rest_of_line ();
return;
}
if (*input_line_pointer != ',')
{
*p = 0;
- as_bad (_("Expected comma after name \"%s\""), name);
+ as_bad (_("expected comma after \"%s\""), name);
*p = c;
ignore_rest_of_line ();
}
return new_seg;
}
#else
- as_bad (_("Attempt to switch to nonexistent segment \"%s\""), segname);
+ as_bad (_("attempt to switch to nonexistent segment \"%s\""), segname);
return now_seg;
#endif
}
|| locsym->lsy_section != now_seg
|| locsym->lsy_value != frag_now_fix ()))
{
- as_bad (_("Symbol %s already defined."), sym_name);
+ as_bad (_("symbol `%s' is already defined"), sym_name);
return symbolP;
}
S_GET_OTHER (symbolP),
S_GET_DESC (symbolP));
#endif
- as_bad (_("Symbol \"%s\" is already defined as \"%s\"/%s%ld."),
+ as_bad (_("symbol `%s' is already defined as \"%s\"/%s%ld"),
sym_name,
segment_name (S_GET_SEGMENT (symbolP)),
od_buf,
if (!(frag_now == symbolP->sy_frag
&& S_GET_VALUE (symbolP) == frag_now_fix ()
&& S_GET_SEGMENT (symbolP) == now_seg))
- as_bad (_("Symbol %s already defined."), sym_name);
+ as_bad (_("symbol `%s' is already defined"), sym_name);
}
}
error_string = hash_jam (local_hash, S_GET_NAME (symbolP),
(PTR) symbolP);
if (error_string != NULL)
- as_fatal (_("Inserting \"%s\" into symbol table failed: %s"),
+ as_fatal (_("inserting \"%s\" into symbol table failed: %s"),
S_GET_NAME (symbolP), error_string);
return;
}
if ((error_string = hash_jam (sy_hash, S_GET_NAME (symbolP), (PTR) symbolP)))
{
- as_fatal (_("Inserting \"%s\" into symbol table failed: %s"),
+ as_fatal (_("inserting \"%s\" into symbol table failed: %s"),
S_GET_NAME (symbolP), error_string);
} /* on error */
}
if (symp->sy_resolving)
{
if (finalize_syms)
- as_bad (_("Symbol definition loop encountered at %s"),
+ as_bad (_("symbol definition loop encountered at `%s'"),
S_GET_NAME (symp));
final_val = 0;
resolved = 1;
{
if (seg_left == undefined_section)
as_bad_where (file, line,
- _("undefined symbol %s in operation"),
+ _("undefined symbol `%s' in operation"),
S_GET_NAME (symp->sy_value.X_add_symbol));
if (seg_right == undefined_section)
as_bad_where (file, line,
- _("undefined symbol %s in operation"),
+ _("undefined symbol `%s' in operation"),
S_GET_NAME (symp->sy_value.X_op_symbol));
if (seg_left != undefined_section
&& seg_right != undefined_section)
else
{
if (seg_left == undefined_section)
- as_bad (_("undefined symbol %s in operation setting %s"),
+ as_bad (_("undefined symbol `%s' in operation setting `%s'"),
S_GET_NAME (symp->sy_value.X_add_symbol),
S_GET_NAME (symp));
if (seg_right == undefined_section)
- as_bad (_("undefined symbol %s in operation setting %s"),
+ as_bad (_("undefined symbol `%s' in operation setting `%s'"),
S_GET_NAME (symp->sy_value.X_op_symbol),
S_GET_NAME (symp));
if (seg_left != undefined_section
&& seg_right != undefined_section)
- as_bad (_("invalid section for operation setting %s"),
+ as_bad (_("invalid section for operation setting `%s'"),
S_GET_NAME (symp));
}
}
if (expr_symbol_where (symp, &file, &line))
as_bad_where (file, line, _("division by zero"));
else
- as_bad (_("division by zero when setting %s"),
+ as_bad (_("division by zero when setting `%s'"),
S_GET_NAME (symp));
}
symp->sy_resolved = 1;
else if (S_GET_SEGMENT (symp) != expr_section)
{
- as_bad (_("can't resolve value for symbol \"%s\""),
+ as_bad (_("can't resolve value for symbol `%s'"),
S_GET_NAME (symp));
symp->sy_resolved = 1;
}
if (! s->sy_resolved
|| s->sy_value.X_op != O_symbol
|| (S_IS_DEFINED (s) && ! S_IS_COMMON (s)))
- as_bad (_("Attempt to get value of unresolved symbol %s"),
+ as_bad (_("attempt to get value of unresolved symbol `%s'"),
S_GET_NAME (s));
recur = NULL;
}
/* Do not reassign section symbols. */
as_where (& file, & line);
as_warn_where (file, line,
- _("Section symbols are already global"));
+ _("section symbols are already global"));
return;
}
s->bsym->flags |= BSF_GLOBAL;
(stdoutput, sec, buf, (file_ptr) offset,
(bfd_size_type) n_per_buf * fill_size);
if (x != true)
- as_fatal (_("Cannot write to output file."));
+ as_fatal (_("cannot write to output file"));
offset += n_per_buf * fill_size;
}
}
if (flag_always_generate_output)
{
if (n_warns || n_errs)
- as_warn (_("%d error%s, %d warning%s, generating bad object file.\n"),
+ as_warn (_("%d error%s, %d warning%s, generating bad object file"),
n_errs, n_errs == 1 ? "" : "s",
n_warns, n_warns == 1 ? "" : "s");
}
else
{
if (n_errs)
- as_fatal (_("%d error%s, %d warning%s, no object file generated.\n"),
+ as_fatal (_("%d error%s, %d warning%s, no object file generated"),
n_errs, n_errs == 1 ? "" : "s",
n_warns, n_warns == 1 ? "" : "s");
}
/* They only differ if `name' is a fb or dollar local
label name. */
if (name2 != name && ! S_IS_DEFINED (symp))
- as_bad (_("local label %s is not defined"), name2);
+ as_bad (_("local label `%s' is not defined"), name2);
}
/* Do it again, because adjust_reloc_syms might introduce
/* Make sure we really got a value for the symbol. */
if (! symbol_resolved_p (symp))
{
- as_bad (_("can't resolve value for symbol \"%s\""),
+ as_bad (_("can't resolve value for symbol `%s'"),
S_GET_NAME (symp));
symbol_mark_resolved (symp);
}
cannot have fewer than 0 chars. That is, we can't
.org backwards. */
as_bad_where (fragP->fr_file, fragP->fr_line,
- _("attempt to .org backwards ignored"));
+ _("attempt to .org backwards"));
/* We've issued an error message. Change the
frag to avoid cascading errors. */
else
bad_sub_reloc:
as_bad_where (fixP->fx_file, fixP->fx_line,
- _("Negative of non-absolute symbol %s"),
+ _("negative of non-absolute symbol `%s'"),
S_GET_NAME (sub_symbolP));
}
else if (S_GET_SEGMENT (sub_symbolP) == add_symbol_segment
as the target of a call instruction. */
if (fixP->fx_tcbit)
as_bad_where (fixP->fx_file, fixP->fx_line,
- _("callj to difference of 2 symbols"));
+ _("callj to difference of two symbols"));
#endif /* TC_I960 */
add_number += (S_GET_VALUE (add_symbolP)
- S_GET_VALUE (sub_symbolP));
char buf[50];
sprint_value (buf, fragP->fr_address + where);
as_bad_where (fixP->fx_file, fixP->fx_line,
- _("Subtraction of two symbols in different sections \"%s\" {%s section} - \"%s\" {%s section} at file address %s."),
+ _("subtraction of two symbols in different sections `%s' {%s section} - `%s' {%s section} at file address %s"),
S_GET_NAME (add_symbolP),
segment_name (S_GET_SEGMENT (add_symbolP)),
S_GET_NAME (sub_symbolP),
else
sprintf (buf2, "%ld", (long) add_number);
as_bad_where (fixP->fx_file, fixP->fx_line,
- _("Value of %s too large for field of %d bytes at %s"),
+ _("value of %s too large for field of %d bytes at %s"),
buf2, size, buf);
} /* Generic error checking. */
}
&& size == 2
&& add_number > 0x7fff)
as_bad_where (fixP->fx_file, fixP->fx_line,
- _("Signed .word overflow; switch may be too large; %ld at 0x%lx"),
+ _("signed .word overflow; switch may be too large; %ld at 0x%lx"),
(long) add_number,
(unsigned long) (fragP->fr_address + where));
#endif