I just ran into an unresolved iterator https://gcc.gnu.org/pipermail/gcc-patches/2024-July/657360.html which motivated me to dig into genoutput.cc where in process_template() we already emit an error but only if the new compact syntax is used. There is probably a reason for limiting the check to the new compact syntax. However, after implementing my own check I realized that both are basically the same. I also did a quick build while removing the limitation to the new compact syntax on x86_64, aarch64, powerpc64le, s390 and it all went through. Skimming through target MD files I also couldn't find a reason why a test for angle brackets shouldn't be done for non-compact syntax but maybe I'm just missing something.
Long story short: would it be fine to perform an unresolved iterator check for non-compact syntax or would that break any target? --- gcc/genoutput.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/genoutput.cc b/gcc/genoutput.cc index efd81766bb5..53a0d0790ae 100644 --- a/gcc/genoutput.cc +++ b/gcc/genoutput.cc @@ -702,7 +702,7 @@ process_template (class data *d, const char *template_code) message_at (d->loc, "trailing whitespace in output template"); /* Check for any unexpanded iterators. */ - if (bp[0] != '*' && d->compact_syntax_p) + if (bp[0] != '*') { const char *p = cp; const char *last_bracket = nullptr; -- 2.45.2