[arm] Improve error checking in parsecpu.awk
commitaa595039dfa62a0839ca3fa0b3376df47a3d9a6f
authorvp <vp@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 22 Sep 2017 16:24:46 +0000 (22 16:24 +0000)
committervp <vp@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 22 Sep 2017 16:24:46 +0000 (22 16:24 +0000)
tree356dd9a89abfa49f2d6042c8008419f11576ef6b
parent789753f17ebe7b14922b641c790576763c9497d0
[arm] Improve error checking in parsecpu.awk

This patch adds a bit more error checking to parsecpu.awk to ensure
that statements are not missing arguments or have excess arguments
beyond those permitted.  It also slightly improves the handling of
errors so that we terminate properly if parsing fails and be as
helpful as we can while in the parsing phase.

2017-09-22  Richard Earnshaw  <richard.earnshaw@arm.com>

* config/arm/parsecpu.awk (fatal): Note that we've encountered an
error.  Only quit immediately if parsing is complete.
(BEGIN): Initialize fatal_err and parse_done.
(begin fpu, end fpu): Check number of arguments.
(begin arch, end arch): Likewise.
(begin cpu, end cpu): Likewise.
(cname, tune for, tune flags, architecture, fpu, option): Likewise.
(optalias): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@253098 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/config/arm/parsecpu.awk