Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » U++ Developers corner » Bug in msc 7.1 ?
Re: Bug in msc 7.1 ? [message #41326 is a reply to message #25709] Sun, 01 December 2013 02:46 Go to previous message
Lance is currently offline  Lance
Messages: 527
Registered: March 2007
Contributor
Interesting. I remember the other day I encountered this problem:

extern "C" extern int array[10];

Compiles fine on VC++11 but will not be accepted in g++ 4.8

I have to revise it to something like
extern "C"{
extern int array[10];
}


I am not sure which is more standard-complying here though.

And I have another very interesting situation. Some predicate I passed to Upp::BiFindIndex(...) stops both VC++11 and g++ upto 4.8 with a compiling error of cannot find a match. And the only thing I need to do to fix it is insert a blank line (or subsequently remove it if there is one already), F5 and it will pass. This symptom is same on both compilers. A recent update on vc++ has fixed the issue but g++ remains the same.

Here is what I do. It can be easily simulated:
inline bool compare_person(const RecordSet::Record& r, int person_id)
{
	return r[0].As<int32>()<person_id;
}

String TrialBalanceCtrl::FormattedPerson(int person_id)
{
	String s;
[b]
	int i=BinFindIndex(person, person_id, compare_person);
	//above line will fail g++4.8 from time to time
	//simply add or remove a line after it will make
	//g++4.8 happy on the next compile pass.
[/b]
	if(i!=person.RecordCount() && person(i,0).As<int32>()==person_id)
	{
		s<<'['<<person(i,"code").As<String>()
			<<"] "<<person(i,"name").As<String>();
	}
	return s;
}
 
Read Message
Read Message
Previous Topic: Bugfix in spec file for Mageia 3
Next Topic: HelloWorld makefile
Goto Forum:
  


Current Time: Thu May 16 18:54:00 CEST 2024

Total time taken to generate the page: 0.03364 seconds