Skip to content
This repository was archived by the owner on Oct 3, 2021. It is now read-only.

Commit 11a5602

Browse files
authored
Merge pull request #1153 from tautschnig/add-undef-assert
Resolving conflicting definitions of assert macro
2 parents 45b057b + 2b3022e commit 11a5602

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+67
-0
lines changed

c/aws-c-common/prelude.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ void __VERIFIER_assert(_Bool cond) {
2424

2525
#define __CPROVER_size_t unsigned long
2626

27+
#undef assert
2728
#define assert(cond) \
2829
__VERIFIER_assert(cond)
2930

c/pthread-atomic/dekker.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ void reach_error() { assert(0); }
1111
*/
1212

1313
#include <pthread.h>
14+
#undef assert
1415
#define assert(e) if (!(e)) ERROR: reach_error()
1516

1617
int flag1 = 0, flag2 = 0; // boolean flags

c/pthread-atomic/lamport.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ void reach_error() { assert(0); }
77
*/
88

99
#include <pthread.h>
10+
#undef assert
1011
#define assert(e) if (!(e)) ERROR: reach_error()
1112

1213
int x, y;

c/pthread-atomic/peterson.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ void reach_error() { assert(0); }
77
*/
88

99
#include <pthread.h>
10+
#undef assert
1011
#define assert(e) if (!(e)) ERROR: reach_error()
1112

1213
int flag1 = 0, flag2 = 0; // boolean flags

c/pthread-atomic/qrcu-1.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ extern int __VERIFIER_nondet_int();
1616
*/
1717

1818
#include <pthread.h>
19+
#undef assert
1920
#define assert(e) if (!(e)) ERROR: reach_error()
2021

2122
int idx=0; // boolean to control which of the two elements will be used by readers

c/pthread-atomic/qrcu-2.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ extern int __VERIFIER_nondet_int();
1616
*/
1717

1818
#include <pthread.h>
19+
#undef assert
1920
#define assert(e) if (!(e)) ERROR: reach_error()
2021

2122
int idx=0; // boolean to control which of the two elements will be used by readers

c/pthread-atomic/read_write_lock-1.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ void reach_error() { assert(0); }
1515
*/
1616

1717
#include <pthread.h>
18+
#undef assert
1819
#define assert(e) if (!(e)) ERROR: reach_error()
1920

2021
int w=0, r=0, x, y;

c/pthread-atomic/read_write_lock-2.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ void reach_error() { assert(0); }
1515
*/
1616

1717
#include <pthread.h>
18+
#undef assert
1819
#define assert(e) if (!(e)) ERROR: reach_error()
1920

2021
int w=0, r=0, x, y;

c/pthread-atomic/scull.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ extern int __VERIFIER_nondet_int();
8383

8484

8585

86+
#undef assert
8687
#define assert(e) if (!(e)) ERROR: reach_error()
8788

8889
inode i;

c/pthread-atomic/szymanski.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ void reach_error() { assert(0); }
77
*/
88

99
#include <pthread.h>
10+
#undef assert
1011
#define assert(e) if (!(e)) ERROR: reach_error()
1112

1213
int flag1 = 0, flag2 = 0; // integer flags

0 commit comments

Comments
 (0)