http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54730
--- Comment #10 from Mikael Morin <mikael at gcc dot gnu.org> 2013-02-12 18:33:50 UTC --- Created attachment 29428 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29428 Fairly complete (untested) fix This patch implements a partial undo framework, in other words multiple level undo. This is necessary because the typespec in the array constructor is optional: if some symbols are created during the typespec match, but the match fails in the end, they have to be removed before parsing the array constructor contents. If we don't do so and the match without typespec succeeds, the extra (possibly incomplete) symbols are committed to the namespace and may lead to unexpected side effects later. Using linked lists through the in-symbol tlink pointer to remember the changed symbols was making it difficult to handle multiple versions of a symbol, so this patch moves the list of changed symbols to the new vec API (which makes it more difficult to backport).