]> git.ipfire.org Git - thirdparty/gcc.git/commit
Improve error reporting from genattrtab.c
authorRichard Sandiford <richard.sandiford@arm.com>
Tue, 1 Dec 2015 09:31:02 +0000 (09:31 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Tue, 1 Dec 2015 09:31:02 +0000 (09:31 +0000)
commit481445220b33cecb6978de0e3917980919f9d1f0
tree3ebb050975be4f6dc3a15b36bc3ffa2aaf960f09
parentc178abcc58a87b2312bc526ceb37dd97939d7083
Improve error reporting from genattrtab.c

The errors reported by check_attr_value weren't very helpful because
they always used the location of the define(_enum)_attr, even if the
error was in a define_insn.  Also, the errors reported by
check_attr_test didn't say which attribute was faulty.

Although not technically a bug fix, it was really useful in writing
the patch for PR68432.

Tested on a variety of targets.

gcc/
* genattrtab.c (check_attr_test): Take an attr_desc instead of
an is_const flag.  Put the file_location argument first.
Update recursive calls.  Improve error messages.
(check_attr_value): Take a file location and use it instead
of attr->loc.  Improve error messages.  Update calls to
check_attr_test.
(check_defs): Update call to check_attr_value.
(make_canonical): Likewise.
(gen_attr): Likewise.
(main): Likewise.
(gen_insn_reserv): Update call to check_attr_test.

From-SVN: r231103
gcc/ChangeLog
gcc/genattrtab.c