https://bugs.llvm.org/show_bug.cgi?id=35114
Bug ID: 35114
Summary: Poor error message from control flow at global scope
Product: clang
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: -New Bugs
Assignee: unassignedclangb...@nondot.org
Reporter: da...@doublewise.net
CC: llvm-bugs@lists.llvm.org
If you compile the following code:
while(true) {}
You get the not especially helpful error message:
<source>:1:1: error: expected unqualified-id
while(true) {}
^
1 error generated.
This came up for me in the context of calling a macro that wrapped a few
statements in a `do { ... } while(false);` construct, and I spend a fair amount
of time looking for a missing semicolon somewhere before I finally found the
problem. I would have preferred to get a message along the lines of "while
loops not allowed outside of functions" or something else that directly says
the problem from the user's perspective.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs