Skip to content

Commit c022d70

Browse files
committed
C front-end: use config.ansi_c.mode to pick compiler-specific configuration
The preprocessor variant is only relevant for c_preprocess, and isn't actually set by goto-cc (which does not use c_preprocess). Fixes: diffblue#2370
1 parent 8562df3 commit c022d70

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/ansi-c/c_typecheck_expr.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3088,9 +3088,7 @@ exprt c_typecheck_baset::do_special_functions(
30883088
{
30893089
// clang returns 4 for _Bool, gcc treats these as 'int'.
30903090
type_number =
3091-
config.ansi_c.preprocessor == configt::ansi_ct::preprocessort::CLANG
3092-
? 4u
3093-
: 1u;
3091+
config.ansi_c.mode == configt::ansi_ct::flavourt::CLANG ? 4u : 1u;
30943092
}
30953093
else
30963094
{

0 commit comments

Comments
 (0)