]>
Commit | Line | Data |
---|---|---|
8e554659 | 1 | /* Test code declaring narrowing functions does not conflict with user macros. |
2b778ceb | 2 | Copyright (C) 2018-2021 Free Software Foundation, Inc. |
8e554659 JM |
3 | This file is part of the GNU C Library. |
4 | ||
5 | The GNU C Library is free software; you can redistribute it and/or | |
6 | modify it under the terms of the GNU Lesser General Public | |
7 | License as published by the Free Software Foundation; either | |
8 | version 2.1 of the License, or (at your option) any later version. | |
9 | ||
10 | The GNU C Library is distributed in the hope that it will be useful, | |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
13 | Lesser General Public License for more details. | |
14 | ||
15 | You should have received a copy of the GNU Lesser General Public | |
16 | License along with the GNU C Library; if not, see | |
5a82c748 | 17 | <https://www.gnu.org/licenses/>. */ |
8e554659 JM |
18 | |
19 | /* The code generating declarations of narrowing functions involves | |
20 | concatenations of fragments of function names that are not | |
21 | themselves reserved; thus, it needs to be arranged so that those | |
22 | fragments are not subject to macro expansion. Verify that | |
23 | inclusion of <math.h> compiles with such fragments defined as | |
24 | macros. */ | |
25 | ||
26 | #define f test macro | |
27 | #define d test macro | |
28 | #define l test macro | |
29 | #define f16 test macro | |
30 | #define f32 test macro | |
31 | #define f64 test macro | |
32 | #define f128 test macro | |
33 | #define f32x test macro | |
34 | #define f64x test macro | |
35 | #define f128x test macro | |
36 | #define add test macro | |
37 | #define sub test macro | |
38 | #define mul test macro | |
39 | #define div test macro | |
40 | #define dadd test macro | |
41 | #define dsub test macro | |
42 | #define dmul test macro | |
43 | #define ddiv test macro | |
44 | #define dsqrt test macro | |
45 | #define dfma test macro | |
46 | ||
47 | #include <math.h> | |
48 | ||
49 | static int | |
50 | do_test (void) | |
51 | { | |
52 | /* This is a compilation test. */ | |
53 | return 0; | |
54 | } | |
55 | ||
56 | #include <support/test-driver.c> |