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 #19866 is a reply to message #19852] Wed, 28 January 2009 05:43 Go to previous messageGo to previous message
Novo is currently offline  Novo
Messages: 1358
Registered: December 2006
Ultimate Contributor
luzr wrote on Tue, 27 January 2009 04:25


Well, that is how it is meant to be. If you do not initialize Size, it is not initialized...

The point is

Buffer<Size> x(1000);

I might not want to have implicit memset(&x, 0, 4000) - what if I know I am going to change these sizes immediately to something else?

Mirek



Objections:

1) it looks like you added documentation about that only today. Wink And the word "uninitialized" is not in capital letters, so, it is very easy to overlook that.

2) you are saving two assembler commands per object and causing a lot of problems for other developers. Does it really worth that? It looks like one needs to learn all these tricky side-effects before he can start developing.

There always be problems with Size because of that. Guess how I found this constructor. Wink At some point you will forget all these tricks yourself. Hopefully it happens after you turn 80. Wink


Regards,
Novo
 
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: Wed May 15 08:50:22 CEST 2024

Total time taken to generate the page: 0.02553 seconds