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

            Bug ID: 47429
           Summary: cannot initialize a variable of type 'unsigned char *'
                    with an lvalue of type 'int'
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected],
                    [email protected]

clang emits an error in the following code, while g++ accepts it. Is this
right?

$ cat s.cpp

template < class C > class A {
        void F ( int a ){
                unsigned char * c = a;}
};

$ clang++ -c s.cpp
s.cpp:3:26: error: cannot initialize a variable of type 'unsigned char *' with
an lvalue of type 'int'
                unsigned char * c = a;}
                                ^   ~
1 error generated.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to