public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Templated labels in egcs 2.91.16
@ 1998-04-02 11:32 Lee Iverson
  0 siblings, 0 replies; only message in thread
From: Lee Iverson @ 1998-04-02 11:32 UTC (permalink / raw)
  To: egcs

[-- Attachment #1: Type: text/plain, Size: 1416 bytes --]

With the following source, we get a nice little illustrative error:
the second use of the `retry' label in a *different* function causes
confusion in the template instantiation mechanism.  In essence, the
fact that we're reusing the label name leads to an unresolved
`reference' to the first label after the second label is properly
resolved.  Changing the name of the label in resize() to retry2 solves
the problem and generates correct code.

% /opt/gnu/gcc/egcs-6.3/bin/g++  -include /home/canada3/IUE/v2.0.1.sri/include/gcc-vers.h Set.instance.C  -O2  -g -Wall -fno-implicit-templates -finline-functions -DNOREPOS -DTIME_WITH_SYS_TIME=1 -DTWO_ARG_GETTIME=1 -DWORDS_BIGENDIAN=1  -UIV_INSTALLED -DCOOL_INSTALLED -DNOREPOS  -I/home/canada3/IUE/v2.0.1.sri/src/lib/TargetJr/IUPackages/COOL  -c -o IRIX6/Set.instance.o
/home/canada3/IUE/v2.0.1.sri/src/lib/TargetJr/IUPackages/COOL/cool/Set.C: In method `bool CoolSet<void *>::resize<void *>(long unsigned int)':
/home/canada3/IUE/v2.0.1.sri/src/lib/TargetJr/IUPackages/COOL/cool/Set.C:349: label `retry' used but not defined
/home/canada3/IUE/v2.0.1.sri/src/lib/TargetJr/IUPackages/COOL/cool/Set.C:333: warning: label `retry' defined but not used

-------------------------------------------------------------------------------
Lee Iverson     		SRI International
leei@ai.sri.com			333 Ravenswood Ave., Menlo Park CA 94025
http://www.ai.sri.com/~leei/	(650) 859-3307


[-- Attachment #2: Set.instance.i.gz --]
[-- Type: application/x-gzip, Size: 12476 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1998-04-02 11:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-04-02 11:32 Templated labels in egcs 2.91.16 Lee Iverson

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