MATCH: Improve `A CMP 0 ? A : -A` set of patterns to use bitwise_equal_p.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / test11006.d
blobe7257b7c2e31c8ec338a4521371e259344328f5c
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);