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

            Bug ID: 16570
           Summary: Wrong diagnostic for mismatching function types
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

$ cat 1.cc
typedef void (*F)(const char * __restrict__, int);
void g(const char *, unsigned);
F f = g;

$ ./build/bin/clang++ -c 1.cc 
1.cc:6:3: error: cannot initialize a variable of type 'F' (aka 'void (*)(const
char *restrict, int)') with an lvalue of
      type 'void (const char *, unsigned int)': type mismatch at 1st parameter
('const char *restrict' vs
      'const char *')
F f = g;
  ^   ~
1 error generated.


The diagnostic should point to the second argument type.

-- 
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