| 1 |
/* |
| 2 |
REQUIRED_ARGS: -de -revert=intpromote |
| 3 |
TEST_OUTPUT: |
| 4 |
--- |
| 5 |
fail_compilation/fail16997.d(31): Deprecation: integral promotion not done for `~c`, remove '-revert=intpromote' switch or `~cast(int)(c)` |
| 6 |
fail_compilation/fail16997.d(32): Deprecation: integral promotion not done for `-c`, remove '-revert=intpromote' switch or `-cast(int)(c)` |
| 7 |
fail_compilation/fail16997.d(33): Deprecation: integral promotion not done for `+c`, remove '-revert=intpromote' switch or `+cast(int)(c)` |
| 8 |
fail_compilation/fail16997.d(36): Deprecation: integral promotion not done for `~w`, remove '-revert=intpromote' switch or `~cast(int)(w)` |
| 9 |
fail_compilation/fail16997.d(37): Deprecation: integral promotion not done for `-w`, remove '-revert=intpromote' switch or `-cast(int)(w)` |
| 10 |
fail_compilation/fail16997.d(38): Deprecation: integral promotion not done for `+w`, remove '-revert=intpromote' switch or `+cast(int)(w)` |
| 11 |
fail_compilation/fail16997.d(41): Deprecation: integral promotion not done for `~sb`, remove '-revert=intpromote' switch or `~cast(int)(sb)` |
| 12 |
fail_compilation/fail16997.d(42): Deprecation: integral promotion not done for `-sb`, remove '-revert=intpromote' switch or `-cast(int)(sb)` |
| 13 |
fail_compilation/fail16997.d(43): Deprecation: integral promotion not done for `+sb`, remove '-revert=intpromote' switch or `+cast(int)(sb)` |
| 14 |
fail_compilation/fail16997.d(46): Deprecation: integral promotion not done for `~ub`, remove '-revert=intpromote' switch or `~cast(int)(ub)` |
| 15 |
fail_compilation/fail16997.d(47): Deprecation: integral promotion not done for `-ub`, remove '-revert=intpromote' switch or `-cast(int)(ub)` |
| 16 |
fail_compilation/fail16997.d(48): Deprecation: integral promotion not done for `+ub`, remove '-revert=intpromote' switch or `+cast(int)(ub)` |
| 17 |
fail_compilation/fail16997.d(51): Deprecation: integral promotion not done for `~s`, remove '-revert=intpromote' switch or `~cast(int)(s)` |
| 18 |
fail_compilation/fail16997.d(52): Deprecation: integral promotion not done for `-s`, remove '-revert=intpromote' switch or `-cast(int)(s)` |
| 19 |
fail_compilation/fail16997.d(53): Deprecation: integral promotion not done for `+s`, remove '-revert=intpromote' switch or `+cast(int)(s)` |
| 20 |
fail_compilation/fail16997.d(56): Deprecation: integral promotion not done for `~us`, remove '-revert=intpromote' switch or `~cast(int)(us)` |
| 21 |
fail_compilation/fail16997.d(57): Deprecation: integral promotion not done for `-us`, remove '-revert=intpromote' switch or `-cast(int)(us)` |
| 22 |
fail_compilation/fail16997.d(58): Deprecation: integral promotion not done for `+us`, remove '-revert=intpromote' switch or `+cast(int)(us)` |
| 23 |
--- |
| 24 |
*/ |
| 25 |
|
| 26 |
void test() |
| 27 |
{ |
| 28 |
int x; |
| 29 |
|
| 30 |
char c; |
| 31 |
x = ~c; |
| 32 |
x = -c; |
| 33 |
x = +c; |
| 34 |
|
| 35 |
wchar w; |
| 36 |
x = ~w; |
| 37 |
x = -w; |
| 38 |
x = +w; |
| 39 |
|
| 40 |
byte sb; |
| 41 |
x = ~sb; |
| 42 |
x = -sb; |
| 43 |
x = +sb; |
| 44 |
|
| 45 |
ubyte ub; |
| 46 |
x = ~ub; |
| 47 |
x = -ub; |
| 48 |
x = +ub; |
| 49 |
|
| 50 |
short s; |
| 51 |
x = ~s; |
| 52 |
x = -s; |
| 53 |
x = +s; |
| 54 |
|
| 55 |
ushort us; |
| 56 |
x = ~us; |
| 57 |
x = -us; |
| 58 |
x = +us; |
| 59 |
} |