[llvm-bugs] [Bug 46289] lack of "templates must have C++ linkage" error message in a linkage specification

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Jun 11 11:17:20 PDT 2020


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

Richard Smith <richard-llvm at metafoo.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INVALID
             Status|NEW                         |RESOLVED

--- Comment #1 from Richard Smith <richard-llvm at metafoo.co.uk> ---
We diagnosed that the declaration on line 2 is invalid. It's not reasonable to
expect a compiler to list every way in which a given declaration is invalid if
there is more than one (that leads to a bad user experience), nor that all
compilers will diagnose invalid code in the same way.

I expect what's happening here is that the source code is being rejected by the
parser, so we don't get as far as performing semantic checks and determining
that we have a template inside an extern "C" block.

-- 
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/20200611/fbfab989/attachment.html>


More information about the llvm-bugs mailing list