]> git.ipfire.org Git - thirdparty/gcc.git/commit
c: Refactor c_parser_unary_expression()
authorAlejandro Colomar <alx@kernel.org>
Sat, 8 Nov 2025 21:52:07 +0000 (22:52 +0100)
committerJoseph Myers <josmyers@redhat.com>
Mon, 10 Nov 2025 21:29:12 +0000 (21:29 +0000)
commitdb44cfbbdc3899586ffbda6c402a7557d9a2a695
treebbe82458a7120a26eb016712fa88b0f26003d293
parentfaf7053346110cbd11fb22ff75f56a964047b19c
c: Refactor c_parser_unary_expression()

Store the 'rid' value in a local variable, and pass it to functions that
handle various keywords.  This simplifies the code, and removes some
wrappers.

No functional change intended.

gcc/c/ChangeLog:

* c-parser.cc (c_parser_sizeof_expression): Remove function.
(c_parser_countof_expression): Remove function.
(c_parser_unary_expression): Store the 'rid', and pass it
directly to the function calls, without calling wrappers.

Suggested-by: Andrew Pinski <andrew.pinski@oss.qualcomm.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
gcc/c/c-parser.cc