public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: sampo@symlabs.com
To: gcc-gnats@gcc.gnu.org
Cc: miguel@symlabs.com
Subject: c++/7338: Error message contains newline, breaks grep -v; warning from include/g++-v3/bits/stl_threads.h
Date: Wed, 17 Jul 2002 05:56:00 -0000	[thread overview]
Message-ID: <20020717124757.26312.qmail@sources.redhat.com> (raw)


>Number:         7338
>Category:       c++
>Synopsis:       Error message contains newline, breaks grep -v; warning from include/g++-v3/bits/stl_threads.h
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Wed Jul 17 05:56:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Sampo Kellomaki
>Release:        Reading specs from /apps/gcc/std/bin/../lib/gcc-lib/sparc-sun-solaris2.6/3.1/specs
>Organization:
>Environment:
SunOS aphrodite 5.6 Generic_105181-29 sun4u sparc SUNW,Ultra-5_10
>Description:
Newer versions of gcc have started emitting error and warning messages
that have embedded newlines. This is most unfortunate as
it makes it difficult to filter out unwanted bogus warnings
using grep -v. An example of such error message is

/apps/gcc/std/include/g++-v3/bits/stl_threads.h: At global scope:
/apps/gcc/std/include/g++-v3/bits/stl_threads.h: In instantiation of `__gthread_mutex_t std::_Swap_lock_struct<0>::_S_swap_lock':
/apps/gcc/std/include/g++-v3/bits/stl_threads.h:122:   instantiated from here
/apps/gcc/std/include/g++-v3/bits/stl_threads.h:115: warning: aggregate has a 
   partly bracketed initializer
/apps/gcc/std/include/g++-v3/bits/stl_threads.h:115: warning: aggregate has a 
   partly bracketed initializer

As can be seen "partly bracketed initializer" is on the next
line, thus complicating ignoring it. World will be better
place if error messages remain on single line. Existing
presentation level tools, such as the emacs compilation mode
are better places to do line wrapping and other formatting.

The above snippet also demonstrates another annoying
"feature", namely that the standard template library
headers that are shipped with gcc-3.1 actually are not
warning clean (on SunOS-5.6 anyway).
>How-To-Repeat:
On SunOS-5.6 machine with gcc-3.1 compiled as follows

cd build-gcc
../gcc-3.1/configure --prefix=/apps/gcc/std
make bootstrap-lean

say

/apps/gcc/std/bin/g++ -Wall -c test.cc
>Fix:
1. Zap the damn newlines from error and warning messages
2. fix include/g++-v3/bits/stl_threads.h
>Release-Note:
>Audit-Trail:
>Unformatted:
 Configured with: ./configure --prefix=/apps/gcc/3.1
 Thread model: posix
 gcc version 3.1
 
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="test.cc"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="test.cc"

LyogdGVzdC5jYyAgLSAgRGVtb3N0cmF0ZXMgY29tcGlsZXIgd2FybmluZyBpbiBpbmNsdWRlL2cr
Ky12My9iaXRzL3N0bF90aHJlYWRzLmgKICogMTcuNy4yMDAyLCBjcmVhdGVkLCBTYW1wbyBLZWxs
b23ka2kgPHNhbXBvQHN5bWxhYnMuY29tPgogKgogKiAvYXBwcy9nY2Mvc3RkL2Jpbi9nKysgLVdh
bGwgLWMgdGVzdC5jYwogKiAvYXBwcy9nY2Mvc3RkL2luY2x1ZGUvZysrLXYzL2JpdHMvc3RsX3Ro
cmVhZHMuaDogSW4gaW5zdGFudGlhdGlvbiBvZiBgX19ndGhyZWFkX211dGV4X3Qgc3RkOjpfU3dh
cF9sb2NrX3N0cnVjdDwwPjo6X1Nfc3dhcF9sb2NrJzoKICogL2FwcHMvZ2NjL3N0ZC9pbmNsdWRl
L2crKy12My9iaXRzL3N0bF90aHJlYWRzLmg6MTIyOiAgIGluc3RhbnRpYXRlZCBmcm9tIGhlcmUK
ICogL2FwcHMvZ2NjL3N0ZC9pbmNsdWRlL2crKy12My9iaXRzL3N0bF90aHJlYWRzLmg6MTE1OiB3
YXJuaW5nOiBhZ2dyZWdhdGUgaGFzIGEgCiAqICAgIHBhcnRseSBicmFja2V0ZWQgaW5pdGlhbGl6
ZXIKICogL2FwcHMvZ2NjL3N0ZC9pbmNsdWRlL2crKy12My9iaXRzL3N0bF90aHJlYWRzLmg6MTE1
OiB3YXJuaW5nOiBhZ2dyZWdhdGUgaGFzIGEgCiAqICAgIHBhcnRseSBicmFja2V0ZWQgaW5pdGlh
bGl6ZXIKCnVuYW1lIC1hClN1bk9TIGFwaHJvZGl0ZSA1LjYgR2VuZXJpY18xMDUxODEtMjkgc3Vu
NHUgc3BhcmMgU1VOVyxVbHRyYS01XzEwCgpjZCBidWlsZC1nY2MKLi4vZ2NjLTMuMS9jb25maWd1
cmUgLS1wcmVmaXg9L2FwcHMvZ2NjL3N0ZAptYWtlIGJvb3RzdHJhcC1sZWFuCgovYXBwcy9nY2Mv
c3RkL2Jpbi9nY2MgLXYKUmVhZGluZyBzcGVjcyBmcm9tIC9hcHBzL2djYy9zdGQvYmluLy4uL2xp
Yi9nY2MtbGliL3NwYXJjLXN1bi1zb2xhcmlzMi42LzMuMS9zcGVjcwpDb25maWd1cmVkIHdpdGg6
IC4vY29uZmlndXJlIC0tcHJlZml4PS9hcHBzL2djYy8zLjEKVGhyZWFkIG1vZGVsOiBwb3NpeApn
Y2MgdmVyc2lvbiAzLjEKCiAqLwoKI2luY2x1ZGUgPHB0aHJlYWQuaD4KI2luY2x1ZGUgPGxpc3Q+
ICAgICAgICAvKiByZW1vdmluZyB0aGlzIGluY2x1ZGUgY2F1c2VzIHRoZSB3YXJuaW5nIHRvIGdv
IGF3YXkgKi8KCm5hbWVzcGFjZSBpbyB7CiAgY2xhc3MgaGFuZGxlciB7CiAgcHVibGljOgogICAg
cHRocmVhZF9tdXRleF90IGlvX2hhbmRsZXJfbXV0ZXg7CiAgfTsgIAp9OwoKaW50Cm1haW4oKQp7
CiAgcmV0dXJuIDA7Cn0KCi8qIEVPRiAgLSAgdGVzdC5jYyAqLwo=


             reply	other threads:[~2002-07-17 12:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-17  5:56 sampo [this message]
2002-07-17  6:21 nathan
2002-07-17  8:46 sampo
2002-07-17  9:36 Gabriel Dos Reis
2002-07-17 11:46 sampo
2002-07-17 12:46 Phil Edwards
2002-07-17 15:56 sampo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020717124757.26312.qmail@sources.redhat.com \
    --to=sampo@symlabs.com \
    --cc=gcc-gnats@gcc.gnu.org \
    --cc=miguel@symlabs.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).