* typeid
@ 2000-01-15 3:39 Evgenii B. Rudnyi
2000-01-17 23:21 ` typeid Mumit Khan
0 siblings, 1 reply; 2+ messages in thread
From: Evgenii B. Rudnyi @ 2000-01-15 3:39 UTC (permalink / raw)
To: cygwin
The output of the program
#include <typeinfo>
#include <iostream>
class test {};
class long_test {};
int main()
{
test a;
long_test b;
cout << typeid(a).name() << endl;
cout << typeid(b).name() << endl;
return 0;
}
under the original gcc in the Cygwin B20.1 and under gcc 2.95.2
(Mumit Khan) is as follows
4test
9long_test
where there is a number (number of bytes in the name, as far as I
understand) before a class name.
Is it a feature or a bug?
Evgenii Rudnyi
--
Chemistry Department rudnyi@comp.chem.msu.su
Moscow State University http://www.chem.msu.su/~rudnyi/
119899 Moscow +7(095)939 5452, fax+7(095)932 8846,+7(095)939 1205
Russia
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: typeid
2000-01-15 3:39 typeid Evgenii B. Rudnyi
@ 2000-01-17 23:21 ` Mumit Khan
0 siblings, 0 replies; 2+ messages in thread
From: Mumit Khan @ 2000-01-17 23:21 UTC (permalink / raw)
To: Evgenii B. Rudnyi; +Cc: cygwin
On Sat, 15 Jan 2000, Evgenii B. Rudnyi wrote:
> #include <typeinfo>
> #include <iostream>
>
> class test {};
>
> class long_test {};
>
> int main()
> {
> test a;
> long_test b;
> cout << typeid(a).name() << endl;
> cout << typeid(b).name() << endl;
> return 0;
> }
>
> under the original gcc in the Cygwin B20.1 and under gcc 2.95.2
> (Mumit Khan) is as follows
>
> 4test
> 9long_test
>
> where there is a number (number of bytes in the name, as far as I
> understand) before a class name.
>
> Is it a feature or a bug?
Feature. See the C++ standard for more information on what compilers
are required to produce (hint: unique names, but not necessarily what
you would like to see).
Please follow up in a C++ specific forum if you have more questions.
Regards,
Mumit
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-01-17 23:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-01-15 3:39 typeid Evgenii B. Rudnyi
2000-01-17 23:21 ` typeid Mumit Khan
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).