Commit d6defa83 authored by Sergio Costas's avatar Sergio Costas

Replaced the __crust_t__ statement with __crust__, because it is easier to...

Replaced the __crust_t__ statement with __crust__, because it is easier to remember and less confusing
parent 042a72ba
......@@ -296,6 +296,7 @@ class crust(object):
continue
print("\033[1;33m{:s}\033[0m: ".format(_("WARNING")), end = "")
print(_(err[1]).format(*tuple(err[2:])))
print("Total: {:d} errors.".format(len(self.errors)))
if delete_errors:
self.errors = []
......
......@@ -109,7 +109,7 @@ void find_close_parentheses(int);
"__asm__"({WS}+[a-zA-Z_]+)*{WS}*"(" { find_close_parentheses(1); count(); }
"asm"({WS}+[a-zA-Z_]+)*{WS}*"(" { find_close_parentheses(1); count(); }
"__alignof__(" { find_close_parentheses(1); count(); return prepare_leaf(1,0.0,CONSTANT); }
"__crust_t__" { return prepare_leaf(0,0.0,CRUST_T); }
"__crust__" { return prepare_leaf(0,0.0,CRUST_T); }
"__crust_borrow__" { return prepare_leaf(0,0.0,CRUST_BORROW); }
"__crust_recycle__" { return prepare_leaf(0,0.0,CRUST_RECYCLE); }
"__crust_alias__" { return prepare_leaf(0,0.0,CRUST_ALIAS); }
......
#define NULL ((void *)0)
typedef __crust_t__ struct {
typedef __crust__ struct {
int member;
int p1;
int p2;
} *crust_t;
__crust_t__ unsigned char * calling(__crust_t__ unsigned char *param1, __crust_recycle__ unsigned char *param2, crust_t param3);
__crust_t__ unsigned char * calling2();
__crust__ unsigned char * calling(__crust__ unsigned char *param1, __crust_recycle__ unsigned char *param2, crust_t param3);
__crust__ unsigned char * calling2();
__crust_t__ unsigned char * calling3() {
__crust__ unsigned char * calling3() {
return NULL;
}
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
void function() {
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
typedef int (*prueba)();
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
typedef crust_t (*prueba)();
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
typedef int (*prueba)(int);
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
typedef int (*prueba)(unsigned char *, int);
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
typedef int (*prueba)(crust_t, int);
......
void function(__crust_t__ int); // ERROR: the CRUST parameter is not a pointer
void function(__crust__ int); // ERROR: the CRUST parameter is not a pointer
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
typedef int (*prueba)(crust_t, int);
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
int function() {
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
crust_t function() {
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
typedef char* (*prueba)(crust_t);
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
void function(__crust_t__ int parameter); // ERROR: named CRUST parameter is not a pointer
void function(__crust__ int parameter); // ERROR: named CRUST parameter is not a pointer
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
typedef __crust_t__ unsigned char crust_t;
typedef __crust__ unsigned char crust_t;
void function() {
......
__crust_t__ struct t_crust_t {
__crust__ struct t_crust_t {
int value;
__crust_t__ struct t_crust_t *next;
__crust__ struct t_crust_t *next;
}
typedef struct t_crust_t *crust_t;
......
__crust_t__ struct t_crust_t {
__crust__ struct t_crust_t {
int value;
__crust_t__ struct t_crust_t *next;
__crust__ struct t_crust_t *next;
}
typedef struct t_crust_t *crust_t;
......
__crust_t__ struct t_crust_t {
__crust__ struct t_crust_t {
int value;
__crust_t__ struct t_crust_t *next;
__crust__ struct t_crust_t *next;
}
typedef struct t_crust_t *crust_t;
......
__crust_t__ struct t_crust_t {
__crust__ struct t_crust_t {
int value;
__crust_t__ struct t_crust_t *next;
__crust__ struct t_crust_t *next;
}
typedef struct t_crust_t *crust_t;
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
__crust_t__ int function() { // ERROR: retval is crust, but it is not a pointer
__crust__ int function() { // ERROR: retval is crust, but it is not a pointer
// empty function
return 0;
}
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
typedef crust_t (*prueba)();
typedef __crust_t__ struct {
typedef __crust__ struct {
prueba function_p;
} *tmp;
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
typedef crust_t (*prueba)();
typedef __crust_t__ struct {
typedef __crust__ struct {
prueba function_p;
} *crust2_t;
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
typedef crust_t (*prueba)();
typedef __crust_t__ struct {
typedef __crust__ struct {
prueba function_p;
} *crust2_t;
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
typedef crust_t (*prueba)();
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
__crust_recycle__ int *var; // ERROR: a variable can be only __crust_t__, never __crust_recycle__
__crust_recycle__ int *var; // ERROR: a variable can be only __crust__, never __crust_recycle__
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
__crust_t__ int * function(__crust_borrow__ __crust_recycle__ int *); // ERROR: a parameter can't be __crust_borrow__ and __crust_recycle__ at the same time
__crust__ int * function(__crust_borrow__ __crust_recycle__ int *); // ERROR: a parameter can't be __crust_borrow__ and __crust_recycle__ at the same time
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
__crust_t__ int * function(__crust_borrow__ __crust_recycle__ int *param); // ERROR: a named parameter can't be __crust_borrow__ and __crust_recycle__ at the same time
__crust__ int * function(__crust_borrow__ __crust_recycle__ int *param); // ERROR: a named parameter can't be __crust_borrow__ and __crust_recycle__ at the same time
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
int * function(__crust_recycle__ int *param); // ERROR: a function with a __crust_recycle__ parameter must return a __crust_t__ value
int * function(__crust_recycle__ int *param); // ERROR: a function with a __crust_recycle__ parameter must return a __crust__ value
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
void function() {
crust_t param4 = NULL;
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
void function2(crust_t param);
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0)
......
typedef __crust_t__ unsigned char *crust_t;
typedef __crust__ unsigned char *crust_t;
#define NULL ((void *)0