File tree Expand file tree Collapse file tree 3 files changed +24
-7
lines changed Expand file tree Collapse file tree 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)
195195 config.ansi_c .arch ==" x86_64" ||
196196 config.ansi_c .arch ==" x32" )
197197 {
198- if (config.ansi_c .mode == configt::ansi_ct::flavourt::APPLE )
198+ if (config.ansi_c .mode != configt::ansi_ct::flavourt::CLANG )
199199 code+=" typedef double __float128;\n " ; // clang doesn't do __float128
200200 }
201201
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+
202212 // On 64-bit systems, gcc has typedefs
203213 // __int128_t und __uint128_t -- but not on 32 bit!
204214 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()
489489 return make_identifier ();
490490 }
491491
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;
497494 }
498495
499496" __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)
126126 config.ansi_c .arch == " x32" )
127127 {
128128 // 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 )
130130 out << " typedef double __float128;" << ' \n ' ;
131131 }
132132
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+
133143 // On 64-bit systems, gcc has typedefs
134144 // __int128_t und __uint128_t -- but not on 32 bit!
135145 if (config.ansi_c .long_int_width >= 64 )
You can’t perform that action at this time.
0 commit comments