You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
returnptr; // c-warning {{implicit conversion when returning 'void *' from a function with result type 'int *' is not permitted in C++}} \
37
37
cxx-error {{cannot initialize return object of type 'int *' with an lvalue of type 'void *'}}
38
38
}
39
+
40
+
voidmore(void) {
41
+
__attribute__((address_space(0))) char*b1= (void*)0; // c-warning {{implicit conversion when initializing '__attribute__((address_space(0))) char *' with an expression of type 'void *' is not permitted in C++}} \
42
+
cxx-error {{cannot initialize a variable of type '__attribute__((address_space(0))) char *' with an rvalue of type 'void *'}}
43
+
__attribute__((address_space(0))) void*b2= (void*)0; // c-warning {{implicit conversion when initializing '__attribute__((address_space(0))) void *' with an expression of type 'void *' is not permitted in C++}} \
44
+
cxx-error {{cannot initialize a variable of type '__attribute__((address_space(0))) void *' with an rvalue of type 'void *'}}
45
+
char*b3= (void*)0; // c-warning {{implicit conversion when initializing 'char *' with an expression of type 'void *' is not permitted in C++}} \
46
+
cxx-error {{cannot initialize a variable of type 'char *' with an rvalue of type 'void *'}}
47
+
48
+
b1= (void*)0; // c-warning {{implicit conversion when assigning to '__attribute__((address_space(0))) char *' from type 'void *' is not permitted in C++}} \
49
+
cxx-error {{assigning 'void *' to '__attribute__((address_space(0))) char *' changes address space of pointer}}
50
+
51
+
b2= (void*)0; // c-warning {{implicit conversion when assigning to '__attribute__((address_space(0))) void *' from type 'void *' is not permitted in C++}} \
52
+
cxx-error {{assigning 'void *' to '__attribute__((address_space(0))) void *' changes address space of pointer}}
53
+
b2= (__attribute__((address_space(0))) void*)0;
54
+
b2=nullptr;
55
+
b2=0;
56
+
57
+
b3= (void*)0; // c-warning {{implicit conversion when assigning to 'char *' from type 'void *' is not permitted in C++}} \
58
+
cxx-error {{assigning to 'char *' from incompatible type 'void *'}}
0 commit comments