http://llvm.org/bugs/show_bug.cgi?id=21656

            Bug ID: 21656
           Summary: Incorrect error on undeclared variable use
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

Using r222680

int main(int argc, char *argv[])
{
    float x = 1.0f;
    x = (float) arst;
}


This produces the unhelpful error:
error: operand of type '<dependent type>' where arithmetic or pointer type is
required
1 error generated.

which doesn't even include a line number.

clang 3.4 produces the correct error:
clang_warning_bug.c:5:17: error: use of undeclared identifier 'arst'
    x = (float) arst;
                ^
1 error generated.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to