Click here to Skip to main content
15,891,423 members

The Weird and The Wonderful

   

The Weird and The Wonderful forum is a place to post Coding Horrors, Worst Practices, and the occasional flash of brilliance.

We all come across code that simply boggles the mind. Lazy kludges, embarrassing mistakes, horrid workarounds and developers just not quite getting it. And then somedays we come across - or write - the truly sublime.

Post your Best, your worst, and your most interesting. But please - no programming questions . This forum is purely for amusement and discussions on code snippets. All actual programming questions will be removed.

 
GeneralRe: Classical unitialized C pointer Pin
YvesDaoust29-Jan-12 21:01
YvesDaoust29-Jan-12 21:01 
GeneralRe: Classical unitialized C pointer Pin
Jochen Arndt29-Jan-12 21:32
professionalJochen Arndt29-Jan-12 21:32 
GeneralRe: Classical unitialized C pointer Pin
YvesDaoust29-Jan-12 23:02
YvesDaoust29-Jan-12 23:02 
GeneralRe: Classical unitialized C pointer Pin
Jochen Arndt29-Jan-12 23:10
professionalJochen Arndt29-Jan-12 23:10 
GeneralRe: Classical unitialized C pointer Pin
YvesDaoust29-Jan-12 23:27
YvesDaoust29-Jan-12 23:27 
GeneralRe: Classical unitialized C pointer Pin
Jochen Arndt29-Jan-12 23:52
professionalJochen Arndt29-Jan-12 23:52 
GeneralRe: Classical unitialized C pointer Pin
YvesDaoust30-Jan-12 0:10
YvesDaoust30-Jan-12 0:10 
GeneralRe: Classical unitialized C pointer Pin
Jochen Arndt30-Jan-12 0:24
professionalJochen Arndt30-Jan-12 0:24 
YvesDaoust wrote:
IMHO such a condition (potentially uninitialized variable) should be signalled by default by any compiler because this can rescue you from painful bugs.

C4700 is a level 1 warning and therefore shown by default (the /Oe limitation does not exist anymore for actual compilers).

With debug versions, I always use level 4. Code is not allowed to be released, if there are any warnings. In some special cases, I use the method from your 2nd link to disable warnings including a comment.

Thank you for the 1st link. I did not know about until now.
GeneralRe: Classical unitialized C pointer Pin
YvesDaoust30-Jan-12 0:37
YvesDaoust30-Jan-12 0:37 
GeneralRe: Classical unitialized C pointer Pin
Jochen Arndt30-Jan-12 1:12
professionalJochen Arndt30-Jan-12 1:12 
GeneralCode Optimize Pin
Rajesh Anuhya16-Jan-12 3:06
professionalRajesh Anuhya16-Jan-12 3:06 
GeneralRe: Code Optimize PinPopular
BobJanova16-Jan-12 3:40
BobJanova16-Jan-12 3:40 
GeneralRe: Code Optimize Pin
Florin Jurcovici16-Jan-12 22:02
Florin Jurcovici16-Jan-12 22:02 
GeneralRe: Code Optimize Pin
BobJanova16-Jan-12 22:46
BobJanova16-Jan-12 22:46 
GeneralRe: Code Optimize Pin
James Lonero17-Jan-12 17:14
James Lonero17-Jan-12 17:14 
GeneralRe: Code Optimize Pin
cpkilekofp27-Jan-12 7:02
cpkilekofp27-Jan-12 7:02 
GeneralRe: Code Optimize PinPopular
Vladimir Svyatski16-Jan-12 23:33
professionalVladimir Svyatski16-Jan-12 23:33 
GeneralRe: Code Optimize Pin
cpkilekofp27-Jan-12 7:05
cpkilekofp27-Jan-12 7:05 
GeneralRe: Code Optimize Pin
Rob Grainger26-Jan-12 12:36
Rob Grainger26-Jan-12 12:36 
RantRe: Code Optimize Pin
cpkilekofp27-Jan-12 8:47
cpkilekofp27-Jan-12 8:47 
GeneralRe: Code Optimize Pin
Rob Grainger30-Jan-12 6:08
Rob Grainger30-Jan-12 6:08 
GeneralRe: Code Optimize Pin
cpkilekofp30-Jan-12 8:28
cpkilekofp30-Jan-12 8:28 
GeneralRe: Code Optimize Pin
Rob Grainger30-Jan-12 11:01
Rob Grainger30-Jan-12 11:01 
GeneralRe: Code Optimize Pin
cpkilekofp30-Jan-12 12:41
cpkilekofp30-Jan-12 12:41 
GeneralRe: Code Optimize Pin
Rob Grainger30-Jan-12 13:40
Rob Grainger30-Jan-12 13:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.