Quoting Steve Reinhardt <[email protected]>:



On 2011-10-21 13:10:26, Gabe Black wrote:
> src/mem/page_table.cc, line 137
> <http://reviews.m5sim.org/r/895/diff/1/?file=15316#file15316line137>
>
> These brackets aren't really needed, although they aren't hurting anything.

Although I see the wiki isn't explicit about it, I've always thought it was part of the style to have braces even around single-statement blocks, as that makes it easier to expand those blocks with additional statements without accidentally messing up your semantics. I certainly remember having discussions about this way back when and thought that we had settled on that rule.

You may be right. I remember we talked about it, but I thought we said the braces were optional and should be left out if the whole body fit on one line (as opposed to just being one statement to the compiler). I'd have to dig up the old emails to say for sure. It's not a big deal one way or the other.

Gabe
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to