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 #19869 is a reply to message #19866] Wed, 28 January 2009 09:46 Go to previous messageGo to previous message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
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?

[Updated on: Wed, 28 January 2009 09:50]

Report message to a moderator

 
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: Mon Apr 29 11:27:54 CEST 2024

Total time taken to generate the page: 0.02832 seconds