diagnostics: always point to the first directive
authorAkim Demaille <akim@lrde.epita.fr>
Mon, 22 Apr 2013 11:55:00 +0000 (13:55 +0200)
committerAkim Demaille <akim@lrde.epita.fr>
Mon, 22 Apr 2013 11:55:00 +0000 (13:55 +0200)
commitf249e803f032cc5e2bdce431589067595fdfd4ef
tree11346c76713a7f13badbeac485de713ea0655fe7
parentdfb12d684501e72538f50f9f5355ca4f15931533
diagnostics: always point to the first directive

Some directives cannot be used several times (e.g., a given symbol may
only have a single printer).  In case of repeated definitions, an
error is issued for the second definition, yet it is not discarded,
and becomes the definition used for the rest of the file.

This is not consistent with the idea that multiple definitions are not
allowed: discard any repeated directive.

* src/symtab.c (symbol_type_set, symbol_code_props_set)
(semantic_type_code_props_set, symbol_class_set, symbol_translation):
Discard repeated directives.
* tests/input.at (Default %printer and %destructor redeclared)
(Per-type %printer and %destructor redeclared): Update expectations.
src/symtab.c
tests/input.at