Merge branch 'maint'

* maint:
  warnings: introduce -Wdeprecated in the usage info
  errors: prefix the output with "error: "
  errors: indent "invalid value for %define" context
  errors: indent "%define var" redefinition context
  errors: indent "symbol redeclaration" context
  errors: indent "result type clash" error context

Conflicts:
	src/complain.c
	src/muscle-tab.c
	src/reader.c
	src/symtab.c
	tests/conflicts.at
	tests/input.at
	tests/named-refs.at
	tests/output.at
	tests/skeletons.at
This commit is contained in:
Akim Demaille
2012-09-26 14:35:47 +02:00
16 changed files with 288 additions and 240 deletions

View File

@@ -128,11 +128,16 @@ record_merge_function_type (int merger, uniqstr type, location declaration_loc)
aver (merge_function != NULL && merger_find == merger);
if (merge_function->type != NULL && !UNIQSTR_EQ (merge_function->type, type))
{
complain_at (declaration_loc, complaint,
_("result type clash on merge function %s: <%s> != <%s>"),
quote (merge_function->name), type, merge_function->type);
complain_at (merge_function->type_declaration_location, complaint,
_("previous declaration"));
unsigned indent = 0;
complain_at_indent (declaration_loc, complaint, &indent,
_("result type clash on merge function %s: "
"<%s> != <%s>"),
quote (merge_function->name), type,
merge_function->type);
indent += SUB_INDENT;
complain_at_indent (merge_function->type_declaration_location, complaint,
&indent,
_("previous declaration"));
}
merge_function->type = uniqstr_new (type);
merge_function->type_declaration_location = declaration_loc;