|
11 | 11 | #include <util/c_types.h> |
12 | 12 | #include <util/config.h> |
13 | 13 |
|
| 14 | +#include <goto-programs/adjust_float_expressions.h> |
| 15 | + |
14 | 16 | #include <linking/static_lifetime_init.h> |
15 | 17 |
|
16 | | -#include <goto-programs/adjust_float_expressions.h> |
| 18 | +#include "ansi_c_parser.h" |
17 | 19 |
|
18 | 20 | const char gcc_builtin_headers_types[] = |
19 | 21 | "#line 1 \"gcc_builtin_headers_types.h\"\n" |
20 | 22 | #include "compiler_headers/gcc_builtin_headers_types.inc" // IWYU pragma: keep |
21 | 23 | ; // NOLINT(whitespace/semicolon) |
22 | 24 |
|
| 25 | +const char gcc_builtin_headers_types_gcc7plus[] = |
| 26 | + "#line 1 \"gcc_builtin_headers_types_gcc7plus.h\"\n" |
| 27 | +// NOLINTNEXTLINE(whitespace/line_length) |
| 28 | +#include "compiler_headers/gcc_builtin_headers_types_gcc7plus.inc" // IWYU pragma: keep |
| 29 | + ; // NOLINT(whitespace/semicolon) |
| 30 | + |
23 | 31 | const char gcc_builtin_headers_generic[] = |
24 | 32 | "#line 1 \"gcc_builtin_headers_generic.h\"\n" |
25 | 33 | #include "compiler_headers/gcc_builtin_headers_generic.inc" // IWYU pragma: keep |
@@ -65,6 +73,9 @@ const char gcc_builtin_headers_ia32_4[] = |
65 | 73 | const char gcc_builtin_headers_ia32_5[] = |
66 | 74 | #include "compiler_headers/gcc_builtin_headers_ia32-5.inc" // IWYU pragma: keep |
67 | 75 | ; // NOLINT(whitespace/semicolon) |
| 76 | +const char gcc_builtin_headers_ia32_6[] = |
| 77 | +#include "compiler_headers/gcc_builtin_headers_ia32-6.inc" // IWYU pragma: keep |
| 78 | + ; // NOLINT(whitespace/semicolon) |
68 | 79 |
|
69 | 80 | const char gcc_builtin_headers_alpha[] = |
70 | 81 | "#line 1 \"gcc_builtin_headers_alpha.h\"\n" |
@@ -229,6 +240,10 @@ void ansi_c_internal_additions(std::string &code) |
229 | 240 | config.ansi_c.mode == configt::ansi_ct::flavourt::ARM) |
230 | 241 | { |
231 | 242 | code+=gcc_builtin_headers_types; |
| 243 | + // check the parser and not config.ansi_c.ts_18661_3_Floatn_types to adjust |
| 244 | + // behaviour depending on C or C++ context |
| 245 | + if(ansi_c_parser.ts_18661_3_Floatn_types) |
| 246 | + code += gcc_builtin_headers_types_gcc7plus; |
232 | 247 |
|
233 | 248 | // there are many more, e.g., look at |
234 | 249 | // https://developer.apple.com/library/mac/#documentation/developertools/gcc-4.0.1/gcc/Target-Builtins.html |
|
0 commit comments