From: Bohdan Vlasyuk <bohdan@kivc.vstu.vinnica.ua>
To: gcc@gcc.gnu.org
Subject: gcc 3.0 and C++
Date: Thu, 19 Jul 2001 11:07:00 -0000 [thread overview]
Message-ID: <20010719205958.A5064@kivc.vstu.vinnica.ua> (raw)
I have strange feeling that it's a kind of `something wrong' with
gcc. Trying to compile my program on gcc 3.0, have this error:
language.cpp: In constructor `LangList::LangList()':
language.cpp:285: no matching function for call to `Data::Data(Data)'
data.h:13: candidates are: Data::Data(Data&)
data.h:11: Data::Data(char*)
data.h:10: Data::Data(long int)
language.cpp:285: initializing argument 1 of `Language::Language(Data)' from
result of `Data::Data(char*)'
relevant lines:
if(S_ISREG(statistics.st_mode)) {
Language * newlang = new Language(directory->d_name);
directory->d_name is char*
Language has only one constructor:
Language(Data);
Data is a kind of universal malloc'ed type, that'd be used [in future
version :-)] for garbage collection. It can be constructed with:
Data(long new_size);
Data(char*s);
Data();
Data(Data& new_d);
I don't understand, why can't Language(char*) just make it
Language(Data(char*)), and why does it complain..
I'm sorry if that's not actually bug, and I admit I'm not very good in
C++.
P.s.: I could send actual preprocessed output, but I guess it'll wait
until anyone would actually confirm it's bug.
thanks!
--
You love peace.
next reply other threads:[~2001-07-19 11:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-07-19 11:07 Bohdan Vlasyuk [this message]
2001-07-20 2:48 ` Rob Taylor
2001-07-20 3:34 ` Rob Taylor
2001-07-20 4:06 Bohdan Vlasyuk
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=20010719205958.A5064@kivc.vstu.vinnica.ua \
--to=bohdan@kivc.vstu.vinnica.ua \
--cc=gcc@gcc.gnu.org \
/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).