@@ -846,7 +846,7 @@ static void add_binary_clause (closure *closure, unsigned a, unsigned b) {
846846 kissat_new_binary_clause (solver , a , b );
847847 else {
848848 kissat_new_unwatched_binary_clause (solver , a , b );
849- litpair litpair = {.lits = {a < b ? a : b , a < b ? b : a }};
849+ litpair litpair = {/* .lits = */ {a < b ? a : b , a < b ? b : a }}; // c++20 only
850850 PUSH_STACK (closure -> binaries , litpair );
851851 }
852852}
@@ -2500,7 +2500,7 @@ static bool indexed_binary (closure *closure, unsigned lit,
25002500 SWAP (unsigned , lit , other );
25012501 if (lit > other )
25022502 SWAP (unsigned , lit , other );
2503- binary_clause binary = {.lits = {lit , other }};
2503+ binary_clause binary = {/* .lits = */ {lit , other }}; // c++20 only
25042504 const unsigned hash = hash_binary (closure , & binary );
25052505 const size_t size = bintab -> size ;
25062506 const size_t size2 = bintab -> size2 ;
@@ -2986,7 +2986,7 @@ static void index_binary (closure *closure, unsigned lit, unsigned other) {
29862986 KISSAT_assert (lit < other );
29872987 binary_hash_table * bintab = & closure -> bintab ;
29882988 KISSAT_assert (!binaries_hash_table_is_full (bintab ));
2989- binary_clause binary = {.lits = {lit , other }};
2989+ binary_clause binary = {/* .lits = */ {lit , other }}; // c++20 only
29902990 const unsigned hash = hash_binary (closure , & binary );
29912991 const size_t size = bintab -> size ;
29922992 const size_t size2 = bintab -> size2 ;
@@ -3416,10 +3416,10 @@ static void copy_conditional_equivalences (kissat *solver, unsigned lit,
34163416 KISSAT_assert (second != INVALID_LIT );
34173417 litpair pair ;
34183418 if (first < second )
3419- pair = ( litpair ){ .lits = { first , second }} ;
3419+ pair .lits [ 0 ] = first , pair . lits [ 1 ] = second ;
34203420 else {
34213421 KISSAT_assert (second < first );
3422- pair = ( litpair ){ .lits = { second , first }} ;
3422+ pair .lits [ 0 ] = second , pair . lits [ 1 ] = first ;
34233423 }
34243424 LOG ("literal %s conditional binary clause %s %s" , LOGLIT (lit ),
34253425 LOGLIT (first ), LOGLIT (second ));
@@ -3491,13 +3491,13 @@ static void search_condeq (closure *closure, unsigned lit, unsigned pos_lit,
34913491 KISSAT_assert (first < second );
34923492 check_ternary (closure , lit , first , NOT (second ));
34933493 check_ternary (closure , lit , NOT (first ), second );
3494- litpair equivalence = {.lits = {first , second }};
3494+ litpair equivalence = {/* .lits = */ {first , second }}; // c++20 only
34953495 PUSH_STACK (* condeq , equivalence );
34963496 if (NEGATED (second )) {
3497- litpair inverse_equivalence = {.lits = {NOT (second ), NOT (first )}};
3497+ litpair inverse_equivalence = {/* .lits = */ {NOT (second ), NOT (first )}}; // c++20 only
34983498 PUSH_STACK (* condeq , inverse_equivalence );
34993499 } else {
3500- litpair inverse_equivalence = {.lits = {second , first }};
3500+ litpair inverse_equivalence = {/* .lits = */ {second , first }}; // c++20 only
35013501 PUSH_STACK (* condeq , inverse_equivalence );
35023502 }
35033503 }
@@ -4549,7 +4549,7 @@ static void forward_subsume_matching_clauses (closure *closure) {
45494549 }
45504550 const reference ref = kissat_reference_clause (solver , c );
45514551 KISSAT_assert (size <= UINT_MAX );
4552- refsize refsize = {.ref = ref , .size = (unsigned )size };
4552+ refsize refsize = {/* .ref = */ ref , /* .size = */ (unsigned )size }; // c++20 only
45534553 PUSH_STACK (candidates , refsize );
45544554 }
45554555 DEALLOC (matchable , VARS );
0 commit comments