]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gdc.test/fail_compilation/test11006.d
d: Import dmd b8384668f, druntime e6caaab9, phobos 5ab9ad256 (v2.098.0-beta.1)
[thirdparty/gcc.git] / gcc / testsuite / gdc.test / fail_compilation / test11006.d
1 /* REQUIRED_ARGS: -main -de
2 * TEST_OUTPUT:
3 ---
4 fail_compilation/test11006.d(10): Deprecation: cannot subtract pointers to different types: `void*` and `int*`.
5 fail_compilation/test11006.d(10): while evaluating: `static assert(2L == 2L)`
6 fail_compilation/test11006.d(11): Deprecation: cannot subtract pointers to different types: `int*` and `void*`.
7 fail_compilation/test11006.d(11): while evaluating: `static assert(8L == 8L)`
8 ---
9 */
10 static assert(cast(void*)8 - cast(int*) 0 == 2L);
11 static assert(cast(int*) 8 - cast(void*)0 == 8L);