From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2F39C3857351; Thu, 29 Sep 2022 17:47:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2F39C3857351 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1664473671; bh=d0DcPZrQAktW6Cf/upaGYz0eiCb2ljHPXnTXKytq+uQ=; h=From:To:Subject:Date:From; b=iepVAvpDjcCFqbivSgSVELrGr0YipDZGo33v2h/aK6gTlmzrjVcu9Ox/+J+YP7doU 78VFUT1fCT4rhara6HPWHE/ym1szGHDfuJu4LfC7EC4Ui6cmNd7HWk7YYn3malzq62 UA94FNfFcanBg+6Z8j3syqQ5EPWQUgIArbeZlQUU= From: "wcs84014 at xcoxc dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug preprocessor/107089] New: Line-terminating '\' leaves the characters when the next-line is a multi-line comment Date: Thu, 29 Sep 2022 17:47:50 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: preprocessor X-Bugzilla-Version: 11.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: wcs84014 at xcoxc dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107089 Bug ID: 107089 Summary: Line-terminating '\' leaves the characters when the next-line is a multi-line comment Product: gcc Version: 11.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: preprocessor Assignee: unassigned at gcc dot gnu.org Reporter: wcs84014 at xcoxc dot com Target Milestone: --- I found it when I tried to use the CPP as a general-purpose macro. ~$ gcc -v Target: x86_64-linux-gnu /gcc version 11.2.0 (Debian 11.2.0-13) ~$ cat a.c 1=3D\ //xyz ok*/ 2=3D\ /*xyz NG*/ 3=3D\(sp)(nl) /*xyz NG*/ 4=3D\ //*xyz ok:gcc NG:-traditional*/ ~$ cat a.c | cpp -P -C -nostdinc #-traditional-cpp 1=3D//xyz ok*/ 2=3D/*xyz z NG*/ :9:3: warning: backslash and newline separated by space 3=3D/*xyz yz NG*/ 4=3D//*xyz ok:gcc NG:-traditional*/=