aboutsummaryrefslogtreecommitdiff
path: root/gcc/value-range.cc
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2023-06-27 08:54:20 +0100
committerRichard Sandiford <richard.sandiford@arm.com>2023-06-27 08:54:20 +0100
commitebe7c586f62b1c5218b19c3c6853163287b3c887 (patch)
treef47624ab777ec639f110cc767882ef48312aa6c5 /gcc/value-range.cc
parentdd86a5a69cbda40cf76388a65d3317c91cb2b501 (diff)
downloadgcc-ebe7c586f62b1c5218b19c3c6853163287b3c887.zip
gcc-ebe7c586f62b1c5218b19c3c6853163287b3c887.tar.gz
gcc-ebe7c586f62b1c5218b19c3c6853163287b3c887.tar.bz2
gengtype: Handle braced initialisers in structs
I have a patch that adds braced initialisers to a GTY structure. gengtype didn't accept that, because it parsed the "{ ... }" in " = { ... };" as the end of a statement (as "{ ... }" would be in a function definition) and so it didn't expect the following ";". This patch explicitly handles initialiser-like sequences. Arguably, the parser should also skip redundant ";", but that feels more like a workaround rather than the real fix. gcc/ * gengtype-parse.cc (consume_until_comma_or_eos): Parse "= { ... }" as a probable initializer rather than a probable complete statement.
Diffstat (limited to 'gcc/value-range.cc')
0 files changed, 0 insertions, 0 deletions