public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/65119] New: -fmessage-length= counts control characters when wrapping the caret line
@ 2015-02-19 13:29 manu at gcc dot gnu.org
0 siblings, 0 replies; only message in thread
From: manu at gcc dot gnu.org @ 2015-02-19 13:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65119
Bug ID: 65119
Summary: -fmessage-length= 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
x*x
void foo()
{
FOO;
}
~/test1/220306M/build/gcc/cc1 test.c -fmessage-length=10
-fdiagnostics-color=always
foo
test.c: In
function
‘foo’
:
test.c:4:144: error: invalid
operands
to
binary
*
(have
‘struct
<anonymous>’
and
‘struct
<anonymous>’
)
x*x
^
test.c:7:3: note: in
expansion
of
macro
‘FOO’
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=.
>From gcc-bugs-return-477775-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Feb 19 13:30:30 2015
Return-Path: <gcc-bugs-return-477775-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
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: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
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" <gcc-bugzilla@gcc.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: <bug-65012-4-r60VfLjeIV@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-65012-4@http.gcc.gnu.org/bugzilla/>
References: <bug-65012-4@http.gcc.gnu.org/bugzilla/>
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?ide012
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-02-19 13:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-19 13:29 [Bug c++/65119] New: -fmessage-length= counts control characters when wrapping the caret line manu at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).