Topic: Unique names (Was: lambda functions proposal) #2
Author: AllanW@my-dejanews.com
Date: 1998/12/01 Raw View
In article <slrn7676pi.hcg.ak@colin.muc.de>,
ak@colin.muc.de (Andi Kleen) wrote:
>
> In article <u9sof15173.fsf@yorick.cygnus.com>, Jason Merrill wrote:
> >>>>>> Andrew Koenig <ark@research.att.com> writes:
>
> > > One useful technique is to use a variant of the name of any of the global
> > > entities defined in the translation unit. A translation unit that
defines
> > > no global entities is useless, as nothing in it can be referred to from
> > > outside, and if it defines a global entity, it cannot be linked with any
> > > other translation unit that defines the same entity.
>
> >What about template instantiations, which could occur in multiple
> >translation units?
>
> Or an object declaration that does all the work from its constructors/
> destructors.
Would have to be a global object, wouldn't it? If it's declared
static it might not be initialized until the first function in that
same module is called. Either way, you're going to need some global
entity.
--
AllanW@my-dejanews.com is a "Spam Magnet" -- never read.
Please reply in USENET only, sorry.
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]
Author: ak@colin.muc.de (Andi Kleen)
Date: 1998/12/01 Raw View
In article <u9sof15173.fsf@yorick.cygnus.com>, Jason Merrill wrote:
>>>>>> Andrew Koenig <ark@research.att.com> writes:
> > One useful technique is to use a variant of the name of any of the global
> > entities defined in the translation unit. A translation unit that defines
> > no global entities is useless, as nothing in it can be referred to from
> > outside, and if it defines a global entity, it cannot be linked with any
> > other translation unit that defines the same entity.
>What about template instantiations, which could occur in multiple
>translation units?
Or an object declaration that does all the work from its constructors/
destructors.
-Andi
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]
Author: Jason Merrill <jason@cygnus.com>
Date: 1998/11/30 Raw View
>>>>> Valentin Bonnard <bonnardv@pratique.fr> writes:
> James.Kanze@dresdner-bank.de wrote:
>> So what do they do?
> I have just reported two egcs bugs so ignore my previous message
> about how egcs does it: egcs simply gets it wrong.
Not in the current development tree; when there is no suitable global
entity, we tack together the file name and a random number, which suffices.
>>>>> Andrew Koenig <ark@research.att.com> writes:
> One useful technique is to use a variant of the name of any of the global
> entities defined in the translation unit. A translation unit that defines
> no global entities is useless, as nothing in it can be referred to from
> outside, and if it defines a global entity, it cannot be linked with any
> other translation unit that defines the same entity.
What about template instantiations, which could occur in multiple
translation units?
Jason
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]
Author: Valentin Bonnard <bonnardv@pratique.fr>
Date: 1998/11/29 Raw View
James.Kanze@dresdner-bank.de wrote:
> So what do they do?
I have just reported two egcs bugs so ignore my previous message
about how egcs does it: egcs simply gets it wrong.
However, I have found a solution:
use the signature of the first extern non inline function
definition; if there isn't one, discard the TU, and
document this behaviour.
--
Valentin Bonnard mailto:bonnardv@pratique.fr
info about C++/a propos du C++: http://pages.pratique.fr/~bonnardv/
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]