public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/7338: Error message contains newline, breaks grep -v; warning from include/g++-v3/bits/stl_threads.h
@ 2002-07-17  5:56 sampo
  0 siblings, 0 replies; 7+ messages in thread
From: sampo @ 2002-07-17  5:56 UTC (permalink / raw)
  To: gcc-gnats; +Cc: miguel


>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=


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: c++/7338: Error message contains newline, breaks grep -v; warning from include/g++-v3/bits/stl_threads.h
@ 2002-07-17 15:56 sampo
  0 siblings, 0 replies; 7+ messages in thread
From: sampo @ 2002-07-17 15:56 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c++/7338; it has been noted by GNATS.

From: sampo@symlabs.com
To: Phil Edwards <phil@jaj.com>
Cc: sampo@symlabs.com, nathan@gcc.gnu.org, gcc-bugs@gcc.gnu.org,
  miguel@symlabs.com, gcc-gnats@gcc.gnu.org
Subject: Re: c++/7338: Error message contains newline, breaks grep -v; warning from include/g++-v3/bits/stl_threads.h
Date: Wed, 17 Jul 2002 22:46:43 GMT

 Phil Edwards writes:
 > On Wed, Jul 17, 2002 at 03:40:22PM +0000, sampo@symlabs.com wrote:
 >> nathan@gcc.gnu.org writes:
 >> > Synopsis: Error message contains newline, breaks grep -v; warning from include/g++-v3/bits/stl_threads.h 
 >> > 
 >> > State-Changed-From-To: open->closed
 >> > State-Changed-By: nathan
 >> > State-Changed-When: Wed Jul 17 06:21:44 2002
 >> > State-Changed-Why:
 >> >     read about -fmessage-length, you want -fmessage-length=0 
 >> 
 >> Thanks for this tidbit, but how about the warning in the stl_threads.h? 
 > 
 > This is in a FAQ somewhere, but:  it's specific to Solaris 2.6, and it's
 > a problem in their thread header files.  Sun fixed the problem in later
 > versions of Solaris but has no plans to backport the fix.  (It's just
 > adding some punctuation, but oh well.)
 
 Thanks. So as Sun does not plan to fix it, then I guess it just
 wont get fixed. Oh well, its just another warning I need to grep -v
 out :-) 
 
  --Sampo 
 
 > Phil
 __________________________________________________________________
 SymLABS        DirectoryScript          www.symlabs.com
   e-nabling      triggers and stored      mobile=+351-918.731.007
   your biz       procedures for LDAP      fax=+351-214.222.637 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: c++/7338: Error message contains newline, breaks grep -v; warning from include/g++-v3/bits/stl_threads.h
@ 2002-07-17 12:46 Phil Edwards
  0 siblings, 0 replies; 7+ messages in thread
From: Phil Edwards @ 2002-07-17 12:46 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c++/7338; it has been noted by GNATS.

From: Phil Edwards <phil@jaj.com>
To: sampo@symlabs.com
Cc: nathan@gcc.gnu.org, gcc-bugs@gcc.gnu.org, miguel@symlabs.com,
   gcc-gnats@gcc.gnu.org
Subject: Re: c++/7338: Error message contains newline, breaks grep -v; warning from include/g++-v3/bits/stl_threads.h
Date: Wed, 17 Jul 2002 15:45:43 -0400

 On Wed, Jul 17, 2002 at 03:40:22PM +0000, sampo@symlabs.com wrote:
 > nathan@gcc.gnu.org writes:
 > > Synopsis: Error message contains newline, breaks grep -v; warning from include/g++-v3/bits/stl_threads.h 
 > > 
 > > State-Changed-From-To: open->closed
 > > State-Changed-By: nathan
 > > State-Changed-When: Wed Jul 17 06:21:44 2002
 > > State-Changed-Why:
 > >     read about -fmessage-length, you want -fmessage-length=0
 > 
 > Thanks for this tidbit, but how about the warning in the stl_threads.h? 
 
 This is in a FAQ somewhere, but:  it's specific to Solaris 2.6, and it's
 a problem in their thread header files.  Sun fixed the problem in later
 versions of Solaris but has no plans to backport the fix.  (It's just
 adding some punctuation, but oh well.)
 
 
 Phil
 
 -- 
 If ye love wealth greater than liberty, the tranquility of servitude greater
 than the animating contest for freedom, go home and leave us in peace.  We seek
 not your counsel, nor your arms.  Crouch down and lick the hand that feeds you;
 and may posterity forget that ye were our countrymen.            - Samuel Adams


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: c++/7338: Error message contains newline, breaks grep -v; warning from include/g++-v3/bits/stl_threads.h
@ 2002-07-17 11:46 sampo
  0 siblings, 0 replies; 7+ messages in thread
From: sampo @ 2002-07-17 11:46 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c++/7338; it has been noted by GNATS.

From: sampo@symlabs.com
To: Gabriel Dos Reis <gdr@codesourcery.com>
Cc: sampo@symlabs.com, gcc-gnats@gcc.gnu.org, miguel@symlabs.com
Subject: Re: c++/7338: Error message contains newline, breaks grep -v; warning from include/g++-v3/bits/stl_threads.h
Date: Wed, 17 Jul 2002 18:45:05 GMT

 Gabriel Dos Reis writes: 
 
 > sampo@symlabs.com writes: 
 > 
 > [...] 
 > 
 > | 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. 
 > 
 > Use -fmessage-length=0.
 
 Thanks. That part understood. Now how about the warning from standard
 template library (include/g++-v3/bits/stl_threads.h)? 
 
 > -- Gaby
 
  --Sampo
 __________________________________________________________________
 SymLABS        DirectoryScript          www.symlabs.com
   e-nabling      triggers and stored      mobile=+351-918.731.007
   your biz       procedures for LDAP      fax=+351-214.222.637 
 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: c++/7338: Error message contains newline, breaks grep -v; warning from include/g++-v3/bits/stl_threads.h
@ 2002-07-17  9:36 Gabriel Dos Reis
  0 siblings, 0 replies; 7+ messages in thread
From: Gabriel Dos Reis @ 2002-07-17  9:36 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c++/7338; it has been noted by GNATS.

From: Gabriel Dos Reis <gdr@codesourcery.com>
To: sampo@symlabs.com
Cc: gcc-gnats@gcc.gnu.org, miguel@symlabs.com
Subject: Re: c++/7338: Error message contains newline, breaks grep -v; warning from include/g++-v3/bits/stl_threads.h
Date: 17 Jul 2002 18:27:00 +0200

 sampo@symlabs.com writes:
 
 [...]
 
 | 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.
 
 Use -fmessage-length=0.
 
 -- Gaby


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: c++/7338: Error message contains newline, breaks grep -v; warning from include/g++-v3/bits/stl_threads.h
@ 2002-07-17  8:46 sampo
  0 siblings, 0 replies; 7+ messages in thread
From: sampo @ 2002-07-17  8:46 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c++/7338; it has been noted by GNATS.

From: sampo@symlabs.com
To: nathan@gcc.gnu.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org,
  miguel@symlabs.com, nobody@gcc.gnu.org, sampo@symlabs.com,
  gcc-gnats@gcc.gnu.org
Cc:  
Subject: Re: c++/7338: Error message contains newline, breaks grep -v; warning from include/g++-v3/bits/stl_threads.h
Date: Wed, 17 Jul 2002 15:40:22 GMT

 nathan@gcc.gnu.org writes:
 > Synopsis: Error message contains newline, breaks grep -v; warning from include/g++-v3/bits/stl_threads.h 
 > 
 > State-Changed-From-To: open->closed
 > State-Changed-By: nathan
 > State-Changed-When: Wed Jul 17 06:21:44 2002
 > State-Changed-Why:
 >     read about -fmessage-length, you want -fmessage-length=0
 
 Thanks for this tidbit, but how about the warning in the stl_threads.h? 
 
 Cheers,
  --Sampo 
 
 > http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7338
 __________________________________________________________________
 SymLABS        DirectoryScript          www.symlabs.com
   e-nabling      triggers and stored      mobile=+351-918.731.007
   your biz       procedures for LDAP      fax=+351-214.222.637 
 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: c++/7338: Error message contains newline, breaks grep -v; warning from include/g++-v3/bits/stl_threads.h
@ 2002-07-17  6:21 nathan
  0 siblings, 0 replies; 7+ messages in thread
From: nathan @ 2002-07-17  6:21 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, miguel, nobody, sampo

Synopsis: Error message contains newline, breaks grep -v; warning from include/g++-v3/bits/stl_threads.h

State-Changed-From-To: open->closed
State-Changed-By: nathan
State-Changed-When: Wed Jul 17 06:21:44 2002
State-Changed-Why:
    read about -fmessage-length, you want -fmessage-length=0

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7338


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2002-07-17 22:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-17  5:56 c++/7338: Error message contains newline, breaks grep -v; warning from include/g++-v3/bits/stl_threads.h sampo
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

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).