public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: libstdc++/8655: Problematic behaviour of std::ends
@ 2002-11-28 9:06 paolo
0 siblings, 0 replies; 8+ messages in thread
From: paolo @ 2002-11-28 9:06 UTC (permalink / raw)
To: Ioannis.Papadopoulos, gcc-bugs, gcc-prs, nobody
Synopsis: Problematic behaviour of std::ends
State-Changed-From-To: feedback->open
State-Changed-By: paolo
State-Changed-When: Wed Nov 20 05:07:28 2002
State-Changed-Why:
Attachment received.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8655
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: libstdc++/8655: Problematic behaviour of std::ends
@ 2002-11-29 0:10 paolo
0 siblings, 0 replies; 8+ messages in thread
From: paolo @ 2002-11-29 0:10 UTC (permalink / raw)
To: Ioannis.Papadopoulos, gcc-bugs, gcc-prs, nobody
Synopsis: Problematic behaviour of std::ends
State-Changed-From-To: feedback->closed
State-Changed-By: paolo
State-Changed-When: Wed Nov 20 12:08:46 2002
State-Changed-Why:
As Wolfgang says, not a bug, duplicate of libstdc++/5737.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8655
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: libstdc++/8655: Problematic behaviour of std::ends
@ 2002-11-28 15:03 Wolfgang Bangerth
0 siblings, 0 replies; 8+ messages in thread
From: Wolfgang Bangerth @ 2002-11-28 15:03 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR libstdc++/8655; it has been noted by GNATS.
From: Wolfgang Bangerth <bangerth@ticam.utexas.edu>
To: gcc-bugs@gcc.gnu.org, <gcc-gnats@gcc.gnu.org>,
Ioannis Papadopoulos <Ioannis.Papadopoulos@cern.ch>
Cc:
Subject: Re: libstdc++/8655: Problematic behaviour of std::ends
Date: Wed, 20 Nov 2002 10:49:08 -0600 (CST)
Ioannis,
This problem is exactly what PR 5735 was about. I found that equally
annoying, but apparently gcc2.95 was not standards conforming, and gcc3
is. I work around this by only appending the std::ends when using gcc2.95,
using the preprocessor for this. Unfortunately, gcc2.95 needs this since
otherwise it will return a non-terminated string, which is of course
useless when assigned to a char*. This is one of the more annoying
incompatibilities between 2.95 and 3.x :-(
Read the audit trail of this report.
Regards
Wolfgang
-------------------------------------------------------------------------
Wolfgang Bangerth email: bangerth@ticam.utexas.edu
www: http://www.ticam.utexas.edu/~bangerth
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: libstdc++/8655: Problematic behaviour of std::ends
@ 2002-11-28 14:49 Ioannis Papadopoulos
0 siblings, 0 replies; 8+ messages in thread
From: Ioannis Papadopoulos @ 2002-11-28 14:49 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR libstdc++/8655; it has been noted by GNATS.
From: Ioannis Papadopoulos <Ioannis.Papadopoulos@cern.ch>
To: reichelt@igpm.rwth-aachen.de, <Ioannis.Papadopoulos@cern.ch>,
<gcc-bugs@gcc.gnu.org>, <gcc-prs@gcc.gnu.org>, <nobody@gcc.gnu.org>,
<gcc-gnats@gcc.gnu.org>
Cc:
Subject: Re: libstdc++/8655: Problematic behaviour of std::ends
Date: Wed, 20 Nov 2002 17:05:16 +0100 (CET)
Hello,
this problems appears on:
1) Redhat Linux 7.2 and 7.3
Output of gcc -v:
Reading specs from
/usr/local/gcc-alt-3.2/lib/gcc-lib/i686-pc-linux-gnu/3.2/specs
Configured with: ./configure --prefix=/usr/local/gcc-alt-3.2 --enable-shared
Thread model: posix
gcc version 3.2
2) SuSE Linuz 8.0
Output of gcc -v:
Reading specs from
/usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.2/specs
Configured with: /root/gcc-3.2/configure
Thread model: posix
gcc version 3.2
> Are you really sure, you don't get the null charachter?
> Nedit displays it as "<soh>" and emacs as "^@".
This is exactly what I get, and this is my problem!
Moreover the C-string is always terminated at the first such character, as
the output of the example code shows:
String size = 6
C-string size = 5
i = 1
i = 1
2nd string size = 9
2nd C-string size = 5
i = 1_1
i = 1
This behaviour did not exist on earlier versions of gcc, eg. 2.95.x
Kind regards,
Ioannis.
On 20 Nov 2002 reichelt@igpm.rwth-aachen.de wrote:
> Synopsis: Problematic behaviour of std::ends
>
> State-Changed-From-To: open->feedback
> State-Changed-By: reichelt
> State-Changed-When: Wed Nov 20 05:57:08 2002
> State-Changed-Why:
> I can't reproduce your problem with gcc 3.2 on i686-pc-linux-gnu.
> However, you did not specify the exact system configuration
> (output of gcc -v) and whether any optimization was used or
> not.
>
> Are you really sure, you don't get the null charachter?
> Nedit displays it as "<soh>" and emacs as "^@".
>
> http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8655
>
--
_____________________________________________________________________
Ioannis PAPADOPOULOS European Laboratory for Particle Physics (CERN)
IT Division, Geneva 23, CH-1211 Switzerland
office: 513-R-042, mailbox: G09100
tel:(+41 22 76) 74672, fax:(+41 22 76) 76830
e-mail: Ioannis.Papadopoulos@cern.ch
URL: http://cern.ch/Ioannis.Papadopoulos
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: libstdc++/8655: Problematic behaviour of std::ends
@ 2002-11-28 11:16 reichelt
0 siblings, 0 replies; 8+ messages in thread
From: reichelt @ 2002-11-28 11:16 UTC (permalink / raw)
To: Ioannis.Papadopoulos, gcc-bugs, gcc-prs, nobody
Synopsis: Problematic behaviour of std::ends
State-Changed-From-To: open->feedback
State-Changed-By: reichelt
State-Changed-When: Wed Nov 20 05:57:08 2002
State-Changed-Why:
I can't reproduce your problem with gcc 3.2 on i686-pc-linux-gnu.
However, you did not specify the exact system configuration
(output of gcc -v) and whether any optimization was used or
not.
Are you really sure, you don't get the null charachter?
Nedit displays it as "<soh>" and emacs as "^@".
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8655
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: libstdc++/8655: Problematic behaviour of std::ends
@ 2002-11-28 8:26 Ioannis Papadopoulos
0 siblings, 0 replies; 8+ messages in thread
From: Ioannis Papadopoulos @ 2002-11-28 8:26 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR libstdc++/8655; it has been noted by GNATS.
From: Ioannis Papadopoulos <Ioannis.Papadopoulos@cern.ch>
To: paolo@gcc.gnu.org, <gcc-bugs@gcc.gnu.org>, <gcc-prs@gcc.gnu.org>,
<nobody@gcc.gnu.org>, <gcc-gnats@gcc.gnu.org>
Cc:
Subject: Re: libstdc++/8655: Problematic behaviour of std::ends
Date: Wed, 20 Nov 2002 14:01:25 +0100 (CET)
This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
Send mail to mime@docserver.cac.washington.edu for more info.
---1970702844-1785715624-1037797285=:23333
Content-Type: TEXT/PLAIN; charset=US-ASCII
Hello,
I send you the attachment which got lost.
Kind regards,
Ioannis.
On 20 Nov 2002 paolo@gcc.gnu.org wrote:
> Synopsis: Problematic behaviour of std::ends
>
> State-Changed-From-To: open->feedback
> State-Changed-By: paolo
> State-Changed-When: Wed Nov 20 04:50:29 2002
> State-Changed-Why:
> Unfortunately, the attachment got lost. Could you possibly
> provide it again?
>
> http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8655
>
--
_____________________________________________________________________
Ioannis PAPADOPOULOS European Laboratory for Particle Physics (CERN)
IT Division, Geneva 23, CH-1211 Switzerland
office: 513-R-042, mailbox: G09100
tel:(+41 22 76) 74672, fax:(+41 22 76) 76830
e-mail: Ioannis.Papadopoulos@cern.ch
URL: http://cern.ch/Ioannis.Papadopoulos
---1970702844-1785715624-1037797285=:23333
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="sl.cpp"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.4.44.0211201401250.23333@lxplus071.cern.ch>
Content-Description:
Content-Disposition: attachment; filename="sl.cpp"
I2luY2x1ZGUgPGlvc3RyZWFtP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1037797285=:23333--
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: libstdc++/8655: Problematic behaviour of std::ends
@ 2002-11-28 8:19 paolo
0 siblings, 0 replies; 8+ messages in thread
From: paolo @ 2002-11-28 8:19 UTC (permalink / raw)
To: Ioannis.Papadopoulos, gcc-bugs, gcc-prs, nobody
Synopsis: Problematic behaviour of std::ends
State-Changed-From-To: open->feedback
State-Changed-By: paolo
State-Changed-When: Wed Nov 20 04:50:29 2002
State-Changed-Why:
Unfortunately, the attachment got lost. Could you possibly
provide it again?
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8655
^ permalink raw reply [flat|nested] 8+ messages in thread
* libstdc++/8655: Problematic behaviour of std::ends
@ 2002-11-28 7:14 Ioannis.Papadopoulos
0 siblings, 0 replies; 8+ messages in thread
From: Ioannis.Papadopoulos @ 2002-11-28 7:14 UTC (permalink / raw)
To: gcc-gnats
>Number: 8655
>Category: libstdc++
>Synopsis: Problematic behaviour of std::ends
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Nov 20 02:46:46 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: Ioannis.Papadopoulos@cern.ch
>Release: 3.2
>Organization:
>Environment:
Linux
>Description:
Funny behaviour of std::ends when using std::ostringstream
It looks as if a funny character is appended instead of \0
It creates serious problems when one has to extract a C-string.
>How-To-Repeat:
build, and run the attached example and the problems will manifest by themselves. Try to redirect the output to a file and open the file with emacs or nedit to see the funny character that ends inserts.
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2002-11-20 20:08 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-28 9:06 libstdc++/8655: Problematic behaviour of std::ends paolo
-- strict thread matches above, loose matches on Subject: below --
2002-11-29 0:10 paolo
2002-11-28 15:03 Wolfgang Bangerth
2002-11-28 14:49 Ioannis Papadopoulos
2002-11-28 11:16 reichelt
2002-11-28 8:26 Ioannis Papadopoulos
2002-11-28 8:19 paolo
2002-11-28 7:14 Ioannis.Papadopoulos
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).