[llvm-bugs] [Bug 51522] New: C++ overload resolution is ambiguous for _ExtInt(8) among primitive alternatives

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Aug 18 06:38:41 PDT 2021


https://bugs.llvm.org/show_bug.cgi?id=51522

            Bug ID: 51522
           Summary: C++ overload resolution is ambiguous for _ExtInt(8)
                    among primitive alternatives
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: pedro.lamarao at gmail.com
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
                    neeilans at live.com, richard-llvm at metafoo.co.uk

See in Godbolt: https://godbolt.org/z/rf8YE63o8

Consider:

void out ( unsigned char data );
void out ( unsigned short data );
void out ( unsigned int data );

void foo ()
{
  unsigned _ExtInt(8) data;
  out(data);
}

Expected:

An _ExtInt(8) parameter would cause overload resolution to select the first
overload with an unsigned char parameter.

Current:

<source>:8:3: error: call to 'out' is ambiguous
  out(data);

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210818/b6652826/attachment.html>


More information about the llvm-bugs mailing list