This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

gcc 3.0 and C++

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:


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(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

P.s.: I could send actual preprocessed output, but I guess it'll wait
until anyone would actually confirm it's bug.


You love peace.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]