To: vim_dev@googlegroups.com Subject: Patch 9.0.1075 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 9.0.1075 (after 9.0.1074) Problem: build fails if the compiler doesn't allow for a declaration right after "case". Solution: Add a block. Files: src/vim9instr.c *** ../vim-9.0.1074/src/vim9instr.c 2022-12-18 21:42:49.014716925 +0000 --- src/vim9instr.c 2022-12-18 22:00:56.013961567 +0000 *************** *** 2188,2216 **** case dest_vimvar: return generate_STORE(cctx, ISN_STOREV, vimvaridx, NULL); case dest_script: - int scriptvar_idx = lhs->lhs_scriptvar_idx; - int scriptvar_sid = lhs->lhs_scriptvar_sid; - if (scriptvar_idx < 0) { ! isntype_T isn_type = ISN_STORES; ! if (SCRIPT_ID_VALID(scriptvar_sid) ! && SCRIPT_ITEM(scriptvar_sid)->sn_import_autoload ! && SCRIPT_ITEM(scriptvar_sid)->sn_autoload_prefix == NULL) ! { ! // "import autoload './dir/script.vim'" - load script first ! if (generate_SOURCE(cctx, scriptvar_sid) == FAIL) ! return FAIL; ! isn_type = ISN_STOREEXPORT; ! } ! // "s:" may be included in the name. ! return generate_OLDSCRIPT(cctx, isn_type, name, ! scriptvar_sid, type); ! } ! return generate_VIM9SCRIPT(cctx, ISN_STORESCRIPT, scriptvar_sid, scriptvar_idx, type); case dest_class_member: return generate_CLASSMEMBER(cctx, FALSE, lhs->lhs_class, lhs->lhs_classmember_idx); --- 2188,2219 ---- case dest_vimvar: return generate_STORE(cctx, ISN_STOREV, vimvaridx, NULL); case dest_script: { ! int scriptvar_idx = lhs->lhs_scriptvar_idx; ! int scriptvar_sid = lhs->lhs_scriptvar_sid; ! if (scriptvar_idx < 0) ! { ! isntype_T isn_type = ISN_STORES; ! if (SCRIPT_ID_VALID(scriptvar_sid) ! && SCRIPT_ITEM(scriptvar_sid)->sn_import_autoload ! && SCRIPT_ITEM(scriptvar_sid)->sn_autoload_prefix == NULL) ! { ! // "import autoload './dir/script.vim'" - load script ! // first ! if (generate_SOURCE(cctx, scriptvar_sid) == FAIL) ! return FAIL; ! isn_type = ISN_STOREEXPORT; ! } ! // "s:" may be included in the name. ! return generate_OLDSCRIPT(cctx, isn_type, name, ! scriptvar_sid, type); ! } ! return generate_VIM9SCRIPT(cctx, ISN_STORESCRIPT, scriptvar_sid, scriptvar_idx, type); + } case dest_class_member: return generate_CLASSMEMBER(cctx, FALSE, lhs->lhs_class, lhs->lhs_classmember_idx); *** ../vim-9.0.1074/src/version.c 2022-12-18 21:42:49.014716925 +0000 --- src/version.c 2022-12-18 21:59:20.962038407 +0000 *************** *** 697,698 **** --- 697,700 ---- { /* Add new patch number below this line */ + /**/ + 1075, /**/ -- DEAD PERSON: I don't want to go in the cart! CUSTOMER: Oh, don't be such a baby. MORTICIAN: I can't take him... DEAD PERSON: I feel fine! CUSTOMER: Oh, do us a favor... MORTICIAN: I can't. The Quest for the Holy Grail (Monty Python) /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///