Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix compatibility issues with gcc-14.x #93

Merged
merged 3 commits into from
Mar 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cl/gcc/clplug.c
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ static void var_db_insert(var_db_t db, struct cl_var *var)

static bool error_detected(void)
{
return global_dc && global_dc->diagnostic_count[DK_ERROR];
return global_dc && errorcount;
}

static void read_gcc_location(struct cl_loc *loc, location_t gcc_loc)
Expand Down
2 changes: 1 addition & 1 deletion cl/tests/data/pt-0850.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ int *ptrA, *ptrB, *ptrC;
int main()
{
ptrA = ptrB;
ptrB = &ptrC;
ptrB = (void *) &ptrC;
}
4 changes: 2 additions & 2 deletions cl/tests/data/pt-0950.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ int test(int *p)
// Note that we are accessing local variable! This is just for points-to
// test purposes.

*p = &i;
*p = (long) &i;
}


int main(int argc, char **argv)
{
int i, j;

i = &j;
i = (long) &j;

// ___cl_pt_points_glob_y(i, j);

Expand Down
2 changes: 2 additions & 0 deletions include/predator-builtins/verifier-builtins.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ void __VERIFIER_error() __attribute__ ((__noreturn__));
* sl.h:62:25: error: ‘int __VERIFIER_nondet_int()’ defined but not used
*/

# include <stdlib.h> // for abort()

static /* inline */ void ___sl_break(const char *msg)
{
(void) msg;
Expand Down
2 changes: 1 addition & 1 deletion tests/predator-regre/test-0170.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ void DLDisposeList (struct TList *L) {
L->Act = ((void *)0);
L->Last = ((void *)0);
}

void DLError(void);
void DLInsertFirst (struct TList *L) {
struct TNode * ptr = malloc(sizeof *ptr);
if (((void *)0)==ptr) {
Expand Down
2 changes: 1 addition & 1 deletion tests/predator-regre/test-0183.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <stdlib.h>

extern int __VERIFIER_nondet_int(void);
#include <verifier-builtins.h>

static void fail(void) {
ERROR:
Expand Down
2 changes: 1 addition & 1 deletion tests/predator-regre/test-0184.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <stdlib.h>

extern int __VERIFIER_nondet_int(void);
#include <verifier-builtins.h>

static void fail(void) {
ERROR:
Expand Down
2 changes: 1 addition & 1 deletion tests/predator-regre/test-0240.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <stdlib.h>

extern int __VERIFIER_nondet_int(void);
#include <verifier-builtins.h>

struct node {
struct node *next;
Expand Down
Loading