This is the mail archive of the
libstdc++-prs@sourceware.cygnus.com
mailing list for the libstdc++ project.
libstdc++/41: -fcheck-memory-usage cannot be used with basic_string<>
- To: libstdc++-gnats at sourceware dot cygnus dot com
- Subject: libstdc++/41: -fcheck-memory-usage cannot be used with basic_string<>
- From: george at moberg dot com
- Date: 10 Mar 2000 21:48:44 -0000
- Reply-To: george at moberg dot com
- Resent-Cc: libstdc++-prs at sourceware dot cygnus dot com
- Resent-Reply-To: libstdc++-gnats@sourceware.cygnus.com, george@moberg.com
>Number: 41
>Category: libstdc++
>Synopsis: -fcheck-memory-usage cannot be used with basic_string<>
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Mar 10 13:57:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator: george@moberg.com
>Release: The version that's included with gcc 2.95.2.
>Organization:
>Environment:
Linux Mandrake 7.0 on an Intel Pentium II.
>Description:
The basic_string<> class uses asm() in its release() method
for the Rep structure. This causes a compilation error
when compiling with the GCC -fcheck-memory-usage option.
>How-To-Repeat:
Compile the above program with the option -fcheck-memory-usage.
>Fix:
I could discover no easy workaround. I would assume that
it would be possible to move the asm() statement in this
function to another file and mark that with
__attribute__ ((no_check_memory_usage)), but I don't know
anything about x86 assembly language.
iostream.h and stl_alloc.h also have assembly language in them.
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="str.cc"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="str.cc"
I2luY2x1ZGUgPHN0cmluZz4KI2luY2x1ZGUgPGlvc3RyZWFtPgoKaW50IG1haW4oaW50IGFyZ2Ms
IGNoYXIgKmFyZ3ZbXSkKewoJc3RyaW5nCXRoZXJlKCJ0aGVyZSEiKTsKCgljb3V0IDw8ICJIZWxs
byAiIDw8IHRoZXJlIDw8IGVuZGw7CgoJcmV0dXJuIDA7Cn0K