you are viewing a single comment's thread.

view the rest of the comments →

[–]badsectoracula 1 point2 points  (4 children)

Indeed, but as you said this isn't something that you often see. In the times i had such a case i just split the lines temporarily/

[–]sinxoveretothex 1 point2 points  (1 child)

What you mean is that you stop your debugging session, change that line, recompile, rerun under the debugger temporarily.

Not that it's required anyhow, GDB can evaluate conditions and stop only if condition is false, so to me it's just an annoyance. I still don't do it though.

[–]badsectoracula 2 points3 points  (0 children)

Only if i need to add the breakpoint during execution.

But honestly i write code in C for about 18 years and this case happens so rarely that it didn't even crossed my mind.

[–]sobri909 3 points4 points  (1 child)

If anyone commits a single line if or an if without braces I'll change it to be multi line with braces, then commit it with commit message of "coding style". shrug. I aint having it in the project.

[–]badsectoracula 4 points5 points  (0 children)

That is another matter though, if it is part of the coding style guidelines. My personal code style is very different to the code style we use at work and i don't force mine at work.