This is the mail archive of the
libstdc++-prs@sourceware.cygnus.com
mailing list for the libstdc++ project.
libstdc++/38: Bug in global map variables
- To: libstdc++-gnats at sourceware dot cygnus dot com
- Subject: libstdc++/38: Bug in global map variables
- From: badger at prtr-13 dot ucsc dot edu
- Date: 27 Feb 2000 17:45:55 -0000
- Cc: badger at prtr-13 dot ucsc dot edu
- Reply-To: badger at prtr-13 dot ucsc dot edu
- Resent-Cc: libstdc++-prs at sourceware dot cygnus dot com, badger at prtr-13 dot ucsc dot edu
- Resent-Reply-To: libstdc++-gnats@sourceware.cygnus.com, badger@prtr-13.ucsc.edu
>Number: 38
>Category: libstdc++
>Synopsis: Bug in global map variables
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Feb 27 09:47:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator: badger@prtr-13.ucsc.edu
>Release: libstdc++-2.90.7 (And libstdc++v2 included with egcs)
>Organization:
>Environment:
Redhat linux-5.2 + kernel2.2 &
sparc-sun-solaris2.5.1
>Description:
I am generating two related errors concerning a global variable
that instantiates the map template class.
When attempting to access the variable from a function, I am
able to access and change keys that were generated in the
calling function as I expect. However, the calling function
is not able to access keys created in the called function.
When attempting to access the variable from code in a second
file none of the keys belonging to the map variable are
available to me. None of the keys generated in this file
are available in the calling function in the main file.
>How-To-Repeat:
The files I am attaching contain a short code snippet to repeat
the error. (If the file does not get to you, please get it
from http://www.tiki-lounge.com/~toshio/map-test.tgz)
Files: map-test.cpp: The file containing the main function.
map-test.h: Contains an extern definition for the
global map variable.
map-extern.cpp:Contains another function that attempts
to use the global map variable.
t: Contains output from the program run.
Compile, link, and run to regenerate the error.
>Fix:
Unknown. If this is just my misunderstanding of the
spec or if this is an error in gcc/egcs rather than
libstdc++, please let me know.
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/x-compressed; name="map-test.tgz"
Content-Transfer-Encoding: base64
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