<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    On 07/30/12 13:13, Ilya Konstantinov wrote:
    <blockquote
cite="mid:CA+dzQZ2wryees+cWv+=RhiMzzj_Hv3GBxQdvzB65jf7KxA1S3Q@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div class="gmail_quote">On Sun, Jul 29, 2012 at 9:47 PM, Jacek
          Caban <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:jacek@codeweavers.com" target="_blank">jacek@codeweavers.com</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div class="im">
              <blockquote class="gmail_quote" style="margin:0 0 0
                .8ex;border-left:1px #ccc solid;padding-left:1ex">Upon
                first attempts to compile, I've received a wall of
                "warning: returning reference to temporary" on Wine's
                headers from g++.<br>
                All of those seem to stem from guidgen.h definition of
                __wine_uuidof / __CRT_UUID_DECL for C++.<br>
              </blockquote>
            </div>
          </blockquote>
          <div> </div>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            I don't see these warnings here. Also Wine has the same code
            for __uuidof as mingw-w64, which is much more widely used
            with g++ (Wine is mostly tested on C), and I never heard
            about such problem. Do you have any idea about what could be
            different in your setup? What's your g++ version?</blockquote>
          <div><br>
          </div>
          <div>I'm using gcc version 4.6.3 (Ubuntu/Linaro
            4.6.3-1ubuntu5) to build my Winelib app.</div>
          <div><br>
          </div>
          <div>As to the difference from mingw-w64, I see different code
            in there:</div>
          <div><a moz-do-not-send="true"
href="http://mingw-w64.svn.sourceforge.net/viewvc/mingw-w64?view=revision&revision=4279">http://mingw-w64.svn.sourceforge.net/viewvc/mingw-w64?view=revision&revision=4279</a>
          </div>
          <div><br>
          </div>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            The idea is that if matches closer to the meaning of
            __uuidof, which should return a reference to constant IID
            structure.</blockquote>
          <div><br>
          </div>
          <div>Understood.</div>
          <div> </div>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            I'd expect compiler to be smart enough to produce same code
            without the reference anyway (after all it's an inline
            function), but still being more explicit would be nice.
            Could you please test if the attached patch fixes the
            problem for you?</blockquote>
          <div><br>
          </div>
          <div>Yep, it does.</div>
        </div>
      </div>
    </blockquote>
    <br>
    I've tested it more and sent a patch.<br>
    <br>
    Jacek<br>
  </body>
</html>