We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 77cfa38 commit fb9deabCopy full SHA for fb9deab
clang/test/C/C23/n3042.c
@@ -83,6 +83,9 @@ void test() {
83
(float)null_val; // expected-error {{cannot cast an object of type 'nullptr_t' to 'float'}}
84
(float)nullptr; // expected-error {{cannot cast an object of type 'nullptr_t' to 'float'}}
85
(nullptr_t)(int *)12; // expected-error {{cannot cast an object of type 'int *' to 'nullptr_t'}}
86
+ (nullptr_t)"testing"; // expected-error {{cannot cast an object of type 'char *' to 'nullptr_t'}}
87
+ (nullptr_t)1.0f; // expected-error {{cannot cast an object of type 'float' to 'nullptr_t'}}
88
+ (nullptr_t)'a'; // expected-error {{cannot cast an object of type 'int' to 'nullptr_t'}}
89
90
(void)null_val; // ok
91
(void)nullptr; // ok
0 commit comments