[llvm-bugs] [Bug 31936] New: Low-quality error message using __declspec without -fms-extensions

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Feb 10 15:05:39 PST 2017


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

            Bug ID: 31936
           Summary: Low-quality error message using __declspec without
                    -fms-extensions
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: efriedma at codeaurora.org
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

C Testcase:
__declspec(noreturn) int f();

Error message:
<stdin>:1:26: error: parameter named 'f' is missing
__declspec(noreturn) int f();
                         ^
<stdin>:1:30: error: expected function body after function declarator
__declspec(noreturn) int f();
                             ^
2 errors generated.

clang is trying to parse this as a old-style C function definition, which leads
to an error message which is difficult to understand.

-- 
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/20170210/fa1001b6/attachment.html>


More information about the llvm-bugs mailing list