<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:dblaikie@gmail.com" title="David Blaikie <dblaikie@gmail.com>"> <span class="fn">David Blaikie</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - compilation error when parameters have certain complexity"
   href="https://bugs.llvm.org/show_bug.cgi?id=38294">bug 38294</a>
          <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>INVALID
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">CC</td>
           <td>
                
           </td>
           <td>dblaikie@gmail.com, richard-llvm@metafoo.co.uk
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>NEW
           </td>
           <td>RESOLVED
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - compilation error when parameters have certain complexity"
   href="https://bugs.llvm.org/show_bug.cgi?id=38294#c1">Comment # 1</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - compilation error when parameters have certain complexity"
   href="https://bugs.llvm.org/show_bug.cgi?id=38294">bug 38294</a>
              from <span class="vcard"><a class="email" href="mailto:dblaikie@gmail.com" title="David Blaikie <dblaikie@gmail.com>"> <span class="fn">David Blaikie</span></a>
</span></b>
        <pre>Richard can correct me if I'm wrong here, but I think this code is invalid,
though no diagnostic is required.

The complexity of the code doesn't seem to matter to Clang rejecting this and
GCC accepting it. I could maintain that invariant (using GCC 8.1 at least - I
don't have a dev revision of GCC built) while reducing the test down to:

class foo {
  void operator+(const foo &x) const;
};
template <int footemplate> void foo_function(foo A, foo B) { A + B; }

Once 'foo_function' isn't a template (or if that template is instantiated in
any way) GCC also rejects this.

C++ doesn't require the compiler to diagnose these sort of cases of invalid
non-dependent expressions - Clang does, GCC doesn't, those are both acceptable
implementations. It'd be a minor quality-of-implementation improvement if GCC
rejected this, since all instantiations of the template are invalid.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>