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 » U++ Library support » Draw, Display, Images, Bitmaps, Icons » Conditional jump or move depends on uninitialised value(s)
Re: Conditional jump or move depends on uninitialised value(s) [message #19873 is a reply to message #19869] Wed, 28 January 2009 16:21 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14267
Registered: November 2005
Ultimate Member
mrjt wrote on Wed, 28 January 2009 03:46

I personally don't think this is a major issue:
1) All Upp 'basic' types (those with public member variables, Point_, Rect_ etc) exibit the same behaviour, so you only have to learn it once.
2) C++ convention is that variables are uninitialised, so you should be aware of the issue already. Buffer<int> x(2000); would be just as uninitialised.

On the other hand, in probably 99.9% of cases initialisation would be safer and come without any practical performance consequences.

Perhaps there is a case for having initialisation on by default, but available to be switched off with a compiler flag for those who really care?


I guess that pretty much sums what I think about the issue... Smile

Except I would not vote for the compiler flag and my wild estimate is more something like 95%....

Mirek
 
Read Message icon13.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: To split Images code to "h" & "cpp" file has a link error, "multiple de
Next Topic: DrawOpWin32.cpp, line 96 q != ERROR
Goto Forum:
  


Current Time: Tue Aug 26 18:28:27 CEST 2025

Total time taken to generate the page: 0.03880 seconds