From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22002 invoked by alias); 19 Feb 2015 13:29:55 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 21893 invoked by uid 48); 19 Feb 2015 13:29:51 -0000 From: "manu at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/65119] New: -fmessage-length= counts control characters when wrapping the caret line Date: Thu, 19 Feb 2015 13:29:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: manu at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED 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 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 X-SW-Source: 2015-02/txt/msg02107.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D65119 Bug ID: 65119 Summary: -fmessage-length=3D counts control characters when wrapping the caret line Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: manu at gcc dot gnu.org struct { int y; } x; #define FOO=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 x*x void foo() { FOO; } ~/test1/220306M/build/gcc/cc1 test.c -fmessage-length=3D10 -fdiagnostics-color=3Dalways foo test.c: In function =E2=80=98foo=E2=80=99 : test.c:4:144: error: invalid operands to=20 binary=20 *=20 (have=20 =E2=80=98struct =E2=80=99 and=20 =E2=80=98struct =E2=80=99 ) x*x ^ test.c:7:3: note: in expansion of=20 macro=20 =E2=80=98FOO=E2=80=99 FOO; ^ The reason is that pp_string() https://github.com/gcc-mirror/gcc/blob/master/gcc/diagnostic.c#L384 counts control characters (such as the color codes) when deciding whether to wrap around, however those characters are not normally visible thus they produce= a strange effect. In general, the whole pretty-printer wrapping is oblivious = to the color codes, which is likely to produce excessive wrapping when using -fmessage-length=3D. >>From gcc-bugs-return-477775-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Feb 19 13:30:30 2015 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 23555 invoked by alias); 19 Feb 2015 13:30:28 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 23443 invoked by uid 48); 19 Feb 2015 13:30:20 -0000 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug lto/65012] [5 Regression] systemd fails to build at least on ppc64el, powerpc, arm-inux-gnueabihf and aarch64 with -flto (ICE) Date: Thu, 19 Feb 2015 13:30:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: lto X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 5.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status resolution Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-02/txt/msg02108.txt.bz2 Content-length: 422 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65012 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #4 from Jakub Jelinek --- Fixed.