The Apple goto fail vulnerability: lessons learned (2014)
1–10 of 42 posts
Re: The Apple goto fail vulnerability: lessons learned (2014)
#2Re: The Apple goto fail vulnerability: lessons learned (2014)
#3One of the ideas to make this error visible is to forbid misleading indentation (section 3.5). It would be cool if the IDE can show this goof straight away..
Re: The Apple goto fail vulnerability: lessons learned (2014)
#4One of the ideas to make this error visible is to forbid misleading indentation (section 3.5). It would be cool if the IDE can show this goof straight away..
https://developers.redhat.com/blog/2016/02/26/gcc-6-wmislead...
However, for some reason, while GCC puts it under -Wall, Clang (which Apple uses) doesn't enable it even with -Wall -Wextra; you have to manually add -Wmisleading-indentation. It's also not enabled by the default Xcode template.
Re: The Apple goto fail vulnerability: lessons learned (2014)
#5Re: The Apple goto fail vulnerability: lessons learned (2014)
#6For as long as I live, I’ll never understand style guides that permit omitting brackets around a single line following an if statement (or for, while, etc), nor code formatters that dont automatically insert them.
Re: The Apple goto fail vulnerability: lessons learned (2014)
#7For as long as I live, I’ll never understand style guides that permit omitting brackets around a single line following an if statement (or for, while, etc), nor code formatters that dont automatically insert them.
I agree - it should be a compile or runtime error.
https://developers.redhat.com/blog/2016/02/26/gcc-6-wmislead...
Re: The Apple goto fail vulnerability: lessons learned (2014)
#8For as long as I live, I’ll never understand style guides that permit omitting brackets around a single line following an if statement (or for, while, etc), nor code formatters that dont automatically insert them.
TBH it would be nice if someone made C with indent scoping instead of block scoping but I don’t think that’s truly practical with the preprocessor.
Re: The Apple goto fail vulnerability: lessons learned (2014)
#9One of the ideas to make this error visible is to forbid misleading indentation (section 3.5). It would be cool if the IDE can show this goof straight away..
Re: The Apple goto fail vulnerability: lessons learned (2014)
#10For as long as I live, I’ll never understand style guides that permit omitting brackets around a single line following an if statement (or for, while, etc), nor code formatters that dont automatically insert them.