2018-11-28 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / floatn-typeof.h
blob4a3e5865a4b1417a91e1145b41631966b761ddc2
1 /* Tests for _FloatN / _FloatNx types: test types of constants.
2 Before including this file, define WIDTH as the value N; define EXT
3 to 1 for _FloatNx and 0 for _FloatN. */
5 #define CONCATX(X, Y) X ## Y
6 #define CONCAT(X, Y) CONCATX (X, Y)
7 #define CONCAT3(X, Y, Z) CONCAT (CONCAT (X, Y), Z)
8 #define CONCAT4(W, X, Y, Z) CONCAT (CONCAT (CONCAT (W, X), Y), Z)
10 #if EXT
11 # define TYPE CONCAT3 (_Float, WIDTH, x)
12 # define CST(C) CONCAT4 (C, f, WIDTH, x)
13 # define CSTU(C) CONCAT4 (C, F, WIDTH, x)
14 #else
15 # define TYPE CONCAT (_Float, WIDTH)
16 # define CST(C) CONCAT3 (C, f, WIDTH)
17 # define CSTU(C) CONCAT3 (C, F, WIDTH)
18 #endif
20 extern TYPE test_type;
21 extern __typeof (CST (1.0)) test_type;
22 extern __typeof (CSTU (1.0)) test_type;