<div dir="ltr">As they are declared static, I think the compiler will optimize out the pointer storage and lookup completely so there should be no wasted space or pointer indirection.<br></div><div class="gmail_extra"><br>
<br><div class="gmail_quote">On Tue, Jul 16, 2013 at 6:42 AM, Jonathan Sauer <span dir="ltr"><<a href="mailto:jonathan.sauer@gmx.de" target="_blank">jonathan.sauer@gmx.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,<br>
<div class="im"><br>
> -static const char *StrEnteringLoop = "Entering loop body";<br>
> -static const char *StrLoopBodyZero = "Loop body executed 0 times";<br>
> +static const char *const StrEnteringLoop = "Entering loop body";<br>
> +static const char *const StrLoopBodyZero = "Loop body executed 0 times";<br>
<br>
</div>Why not replace the pointers with arrays:<br>
<br>
> static const char StrEnteringLoop[] = "Entering loop body";<br>
<br>
That would avoid having to remember to add two const. It could even result<br>
in slightly (very very slightly) faster code as it would remove a pointer<br>
indirection.<br>
<div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>~Craig
</div>