]> gcc.gnu.org Git - gcc.git/commit
Improve error message for if with an else part while in switch
authorAndrew Pinski <apinski@marvell.com>
Wed, 12 Jul 2023 05:14:18 +0000 (22:14 -0700)
committerAndrew Pinski <apinski@marvell.com>
Thu, 14 Sep 2023 14:29:43 +0000 (07:29 -0700)
commit4241415b8817d505e92144175c040a48b1cf2b9f
tree6691be9f6d271d143c54cc3bad0e08e365955b16
parent8ebb02dd6c9d190c84bf40259201e8e7327291f8
Improve error message for if with an else part while in switch

While writing some match.pd code, I was trying to figure
out why I was getting an `expected ), got (` error message
while writing an if statement with an else clause. For switch
statements, the if statements cannot have an else clause so
it would be better to have a decent error message saying that
explictly.

OK? Bootstrapped and tested on x86_64-linux-gnu.

gcc/ChangeLog:

* genmatch.cc (parser::parse_result): For an else clause
of an if statement inside a switch, error out explictly.
gcc/genmatch.cc
This page took 0.060128 seconds and 6 git commands to generate.