File tree 3 files changed +24
-7
lines changed
3 files changed +24
-7
lines changed Original file line number Diff line number Diff line change @@ -195,10 +195,20 @@ void ansi_c_internal_additions(std::string &code)
195
195
config.ansi_c .arch ==" x86_64" ||
196
196
config.ansi_c .arch ==" x32" )
197
197
{
198
- if (config.ansi_c .mode == configt::ansi_ct::flavourt::APPLE )
198
+ if (config.ansi_c .mode != configt::ansi_ct::flavourt::CLANG )
199
199
code+=" typedef double __float128;\n " ; // clang doesn't do __float128
200
200
}
201
201
202
+ if (
203
+ config.ansi_c .arch == " i386" || config.ansi_c .arch == " x86_64" ||
204
+ config.ansi_c .arch == " x32" || config.ansi_c .arch == " ia64" )
205
+ {
206
+ // clang doesn't do __float80
207
+ // Note that __float80 is a typedef, and not a keyword.
208
+ if (config.ansi_c .mode != configt::ansi_ct::flavourt::CLANG)
209
+ code += " typedef __CPROVER_Float64x __float80;\n " ;
210
+ }
211
+
202
212
// On 64-bit systems, gcc has typedefs
203
213
// __int128_t und __uint128_t -- but not on 32 bit!
204
214
if (config.ansi_c .long_int_width >=64 )
Original file line number Diff line number Diff line change @@ -489,11 +489,8 @@ void ansi_c_scanner_init()
489
489
return make_identifier ();
490
490
}
491
491
492
- " __float80" { // clang doesn't have it
493
- if (PARSER.mode ==configt::ansi_ct::flavourt::GCC)
494
- { loc (); return TOK_GCC_FLOAT80; }
495
- else
496
- return make_identifier ();
492
+ " __CPROVER__Float64x" {
493
+ loc (); return TOK_GCC_FLOAT64X;
497
494
}
498
495
499
496
" __float128" { // clang doesn't have it
Original file line number Diff line number Diff line change @@ -126,10 +126,20 @@ void cpp_internal_additions(std::ostream &out)
126
126
config.ansi_c .arch == " x32" )
127
127
{
128
128
// clang doesn't do __float128
129
- if (config.ansi_c .mode == configt::ansi_ct::flavourt::APPLE )
129
+ if (config.ansi_c .mode != configt::ansi_ct::flavourt::CLANG )
130
130
out << " typedef double __float128;" << ' \n ' ;
131
131
}
132
132
133
+ if (
134
+ config.ansi_c .arch == " i386" || config.ansi_c .arch == " x86_64" ||
135
+ config.ansi_c .arch == " x32" || config.ansi_c .arch == " ia64" )
136
+ {
137
+ // clang doesn't do __float80
138
+ // Note that __float80 is a typedef, and not a keyword.
139
+ if (config.ansi_c .mode != configt::ansi_ct::flavourt::CLANG)
140
+ out << " typedef __CPROVER_Float64x __float80;" << ' \n ' ;
141
+ }
142
+
133
143
// On 64-bit systems, gcc has typedefs
134
144
// __int128_t und __uint128_t -- but not on 32 bit!
135
145
if (config.ansi_c .long_int_width >= 64 )
You can’t perform that action at this time.
0 commit comments