From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E9CCF3870C27; Wed, 11 May 2022 06:23:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E9CCF3870C27 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug preprocessor/89971] [9/10 Regression] ICE: unspellable token PADDING Date: Wed, 11 May 2022 06:23:45 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: preprocessor X-Bugzilla-Version: 9.0 X-Bugzilla-Keywords: diagnostic, ice-on-invalid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: jakub at gcc dot gnu.org X-Bugzilla-Target-Milestone: 9.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 May 2022 06:23:46 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D89971 --- Comment #13 from CVS Commits --- The releases/gcc-9 branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:86b98701bf927ea438354723932e623557c04e42 commit r9-10116-g86b98701bf927ea438354723932e623557c04e42 Author: Jakub Jelinek Date: Thu Dec 30 22:23:58 2021 +0100 libcpp: Fix up ##__VA_OPT__ handling [PR89971] In the following testcase we incorrectly error about pasting / token with padding token (which is a result of __VA_OPT__); instead we should like e.g. for ##arg where arg is empty macro argument clear PASTE_LEFT flag of the previous token if __VA_OPT__ doesn't add any real tokens (which can happen either because the macro doesn't have any tokens passed to ... (i.e. __VA_ARGS__ expands to empty) or when __VA_OPT__ doesn't have any tokens in between ()s). 2021-12-30 Jakub Jelinek PR preprocessor/89971 libcpp/ * macro.c (replace_args): For ##__VA_OPT__, if __VA_OPT__ expan= ds to no tokens at all, drop PASTE_LEFT flag from the previous tok= en. gcc/testsuite/ * c-c++-common/cpp/va-opt-9.c: New test. (cherry picked from commit 5545d1edcbdb1701443f94dde7ec97c5ce3e1a6c)=