Click here to Skip to main content
15,912,400 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: Logical AND with false... Pin
Albert Holguin24-Jan-12 5:05
professionalAlbert Holguin24-Jan-12 5:05 
GeneralRe: Logical AND with false... Pin
BobJanova24-Jan-12 9:55
BobJanova24-Jan-12 9:55 
GeneralRe: Logical AND with false... Pin
cpkilekofp27-Jan-12 6:44
cpkilekofp27-Jan-12 6:44 
GeneralRe: Logical AND with false... Pin
BillW3325-Jan-12 5:05
professionalBillW3325-Jan-12 5:05 
GeneralRe: Logical AND with false... Pin
englebart27-Jan-12 2:11
professionalenglebart27-Jan-12 2:11 
GeneralRe: Logical AND with false... Pin
Albert Holguin27-Jan-12 9:16
professionalAlbert Holguin27-Jan-12 9:16 
GeneralClassical unitialized C pointer Pin
Jochen Arndt20-Jan-12 0:59
professionalJochen Arndt20-Jan-12 0:59 
GeneralRe: Classical unitialized C pointer Pin
Albert Holguin23-Jan-12 4:52
professionalAlbert Holguin23-Jan-12 4:52 
JokeRe: Classical unitialized C pointer Pin
cpkilekofp27-Jan-12 6:35
cpkilekofp27-Jan-12 6:35 
GeneralRe: Classical unitialized C pointer Pin
ii_noname_ii24-Jan-12 3:42
ii_noname_ii24-Jan-12 3:42 
GeneralRe: Classical unitialized C pointer Pin
cpkilekofp27-Jan-12 6:48
cpkilekofp27-Jan-12 6:48 
GeneralRe: Classical unitialized C pointer Pin
Stefan_Lang25-Jan-12 4:44
Stefan_Lang25-Jan-12 4:44 
GeneralRe: Classical unitialized C pointer Pin
Jochen Arndt25-Jan-12 5:51
professionalJochen Arndt25-Jan-12 5:51 
GeneralRe: Classical unitialized C pointer Pin
cpkilekofp27-Jan-12 6:51
cpkilekofp27-Jan-12 6:51 
GeneralRe: Classical unitialized C pointer Pin
Stefan_Lang29-Jan-12 22:16
Stefan_Lang29-Jan-12 22:16 
GeneralRe: Classical unitialized C pointer Pin
MarvinMartian28-Jan-12 11:50
MarvinMartian28-Jan-12 11:50 
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 

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.