Last change
on this file since 960665c was
53692b3,
checked in by Peter A. Buhr <pabuhr@…>, 3 years ago
|
second attempt to fix compile-only pragma message that gcc-10/11 quote
|
-
Property mode set to
100644
|
File size:
1.2 KB
|
Rev | Line | |
---|
[a933bcb3] | 1 | // |
---|
| 2 | // Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo |
---|
| 3 | // |
---|
| 4 | // The contents of this file are covered under the licence agreement in the |
---|
| 5 | // file "LICENCE" distributed with Cforall. |
---|
| 6 | // |
---|
[dc8511c] | 7 | // numericConstants.cfa -- |
---|
[a933bcb3] | 8 | // |
---|
| 9 | // Author : Peter A. Buhr |
---|
| 10 | // Created On : Wed May 24 22:10:36 2017 |
---|
| 11 | // Last Modified By : Peter A. Buhr |
---|
[53692b3] | 12 | // Last Modified On : Sat Jun 5 10:07:52 2021 |
---|
| 13 | // Update Count : 8 |
---|
[a933bcb3] | 14 | // |
---|
| 15 | |
---|
[62edde5] | 16 | int main() { |
---|
[10dc7491] | 17 | 1; // decimal |
---|
| 18 | 2_1; |
---|
| 19 | 2_147_483_647; |
---|
| 20 | 37LL; |
---|
| 21 | 45ull; |
---|
| 22 | 89llu; |
---|
| 23 | 99LLu; |
---|
| 24 | 56_lu; |
---|
| 25 | 88_LLu; |
---|
| 26 | |
---|
| 27 | // 0; // octal |
---|
| 28 | 0u; |
---|
| 29 | 0_3_77; |
---|
| 30 | 0_377_ul; |
---|
| 31 | |
---|
| 32 | 0x1; // hexadecimal |
---|
| 33 | 0x1u; |
---|
| 34 | 0xabL; |
---|
| 35 | 0x_80000000; |
---|
| 36 | 0x_fff; |
---|
| 37 | 0x_ef3d_aa5c; |
---|
| 38 | 0x_3LL; |
---|
| 39 | |
---|
| 40 | 3.; // integral real |
---|
| 41 | 3_100.; |
---|
| 42 | 1_000_000.; |
---|
| 43 | |
---|
| 44 | 3.1; // integral/fractional real |
---|
| 45 | 3.141_592_654L; |
---|
| 46 | 123_456.123_456; |
---|
| 47 | |
---|
| 48 | 3E1; // integral/exponent real |
---|
| 49 | 3_e1f; |
---|
| 50 | 3_E1_1_F; |
---|
| 51 | 3_E_11; |
---|
| 52 | 3_e_+11; |
---|
| 53 | 3_E_-11; |
---|
| 54 | |
---|
| 55 | 3.0E1; // integral/fractional/exponent real |
---|
| 56 | 3.0_E1L; |
---|
| 57 | 3.0_e1_1; |
---|
| 58 | 3.0_E_11_l; |
---|
| 59 | 3.0_e_+11l; |
---|
| 60 | 3.0_E_-11; |
---|
| 61 | 123_456.123_456E-16; |
---|
| 62 | |
---|
| 63 | 0x_ff.ffp0; // hex real |
---|
| 64 | 0x_1.ffff_ffff_p_128_l; |
---|
[66812dd] | 65 | |
---|
[53692b3] | 66 | #pragma GCC warning "Compiled" // force non-empty .expect file, NO TABS!!! |
---|
[a933bcb3] | 67 | } // main |
---|
| 68 | |
---|
| 69 | // Local Variables: // |
---|
| 70 | // tab-width: 4 // |
---|
[0e66857] | 71 | // compile-command: "cfa numericConstants.cfa" // |
---|
[a933bcb3] | 72 | // End: // |
---|
Note: See
TracBrowser
for help on using the repository browser.