<div class="gmail_quote">On Mon, Jun 11, 2012 at 6:31 PM, Aaron Wishnick <span dir="ltr"><<a href="mailto:aaron.s.wishnick@gmail.com" target="_blank">aaron.s.wishnick@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word"><div class="im"><div><div>On Jun 11, 2012, at 9:15 PM, Richard Smith wrote:</div><blockquote type="cite"><div class="gmail_quote"><div>Do we need __LPREFIX() support for anything else? If not, it would seem a lot simpler to add support for a L__FUNCTION__, which behaves just like __FUNCTION__ but produces a wide string.</div>

</div>
</blockquote></div><div><br></div></div><div>MSVC also supports some other predefined expressions, like __FUNCDNAME__, __FUNCSIG__, etc, so it would be necessary to provide the wide versions of any of those.</div></div></blockquote>
<div><br></div><div>OK, but we don't yet support any of those, and adding the L version at the same time would probably not be a massive undertaking.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word"><div> Also, though it's undocumented, there are people who know about it and use it, e.g. see [1] and [2]. Also, my hope for this patch is to increase compatibility with the MSVC headers, as well as other projects that only target Microsoft's compiler, and there's the potential for those other projects to make use of the __LPREFIX extension.</div>
</div></blockquote><div><br></div><div>If that's a problem in practice, we could provide a predefined __LPREFIX macro:</div><div><br></div><div>#define __LPREFIX_impl(x) L ## x</div><div>#define __LPREFIX(x) __LPREFIX_impl(x)</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>I agree though, it would be much simpler to add L__FUNCTION__, so I guess it's up to you where you want to set the bar.</div>
</div></blockquote></div><div><br></div>It certainly seems reasonable for us to provide compatibility with constructs which are used in MSVC headers, such as L ## __FUNCTION__. The argument for providing perfect compatibility (to handle situations we've not seen) is weaker.