Skip to content

Commit 4467719

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: #2370
1 parent a5092cb commit 4467719

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/ansi-c/c_typecheck_expr.cpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -3092,9 +3092,7 @@ exprt c_typecheck_baset::do_special_functions(
30923092
{
30933093
// clang returns 4 for _Bool, gcc treats these as 'int'.
30943094
type_number =
3095-
config.ansi_c.preprocessor == configt::ansi_ct::preprocessort::CLANG
3096-
? 4u
3097-
: 1u;
3095+
config.ansi_c.mode == configt::ansi_ct::flavourt::CLANG ? 4u : 1u;
30983096
}
30993097
else
31003098
{

0 commit comments

Comments
 (0)