File tree 3 files changed +22
-7
lines changed
3 files changed +22
-7
lines changed Original file line number Diff line number Diff line change @@ -199,6 +199,17 @@ void ansi_c_internal_additions(std::string &code)
199
199
code+=" typedef double __float128;\n " ; // clang doesn't do __float128
200
200
}
201
201
202
+ if (config.ansi_c .arch ==" i386" ||
203
+ config.ansi_c .arch ==" x86_64" ||
204
+ config.ansi_c .arch ==" x32" ||
205
+ config.ansi_c .arch ==" ia64" )
206
+ {
207
+ // clang doesn't do __float80
208
+ // Note that __float80 is a typedef, and not a keyword.
209
+ if (config.ansi_c .mode ==configt::ansi_ct::flavourt::APPLE)
210
+ code+=" typedef _Float64x __float80;\n " ;
211
+ }
212
+
202
213
// On 64-bit systems, gcc has typedefs
203
214
// __int128_t und __uint128_t -- but not on 32 bit!
204
215
if (config.ansi_c .long_int_width >=64 )
Original file line number Diff line number Diff line change @@ -489,13 +489,6 @@ 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 ();
497
- }
498
-
499
492
" __float128" { // clang doesn't have it
500
493
if (PARSER.mode ==configt::ansi_ct::flavourt::GCC)
501
494
{ loc (); return TOK_GCC_FLOAT128; }
Original file line number Diff line number Diff line change @@ -130,6 +130,17 @@ void cpp_internal_additions(std::ostream &out)
130
130
out << " typedef double __float128;" << ' \n ' ;
131
131
}
132
132
133
+ if (config.ansi_c .arch ==" i386" ||
134
+ config.ansi_c .arch ==" x86_64" ||
135
+ config.ansi_c .arch ==" x32" ||
136
+ config.ansi_c .arch ==" ia64" )
137
+ {
138
+ // clang doesn't do __float80
139
+ // Note that __float80 is a typedef, and not a keyword.
140
+ if (config.ansi_c .mode ==configt::ansi_ct::flavourt::APPLE)
141
+ out << " typedef _Float64x __float80;" << ' \n ' ;
142
+ }
143
+
133
144
// On 64-bit systems, gcc has typedefs
134
145
// __int128_t und __uint128_t -- but not on 32 bit!
135
146
if (config.ansi_c .long_int_width >= 64 )
You can’t perform that action at this time.
0 commit comments