From: Lee Iverson <leei@ai.sri.com>
To: egcs@cygnus.com
Subject: Templated labels in egcs 2.91.16
Date: Thu, 02 Apr 1998 11:32:00 -0000 [thread overview]
Message-ID: <199803311736.JAA14102@Canada.AI.SRI.COM> (raw)
[-- 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 --]
reply other threads:[~1998-04-02 11:32 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=199803311736.JAA14102@Canada.AI.SRI.COM \
--to=leei@ai.sri.com \
--cc=egcs@cygnus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).