Skip to content
Snippets Groups Projects
Commit ff31181a authored by Virgile Prevosto's avatar Virgile Prevosto Committed by Andre Maroneze
Browse files

[machdep] more robust regex for equivalent type identification

parent e047e11e
No related branches found
No related tags found
No related merge requests found
......@@ -191,7 +191,7 @@ def find_value(name, typ, output):
return int(x)
elif typ == "type":
expected = "([a-zA-Z_]+)"
expected = "'([^']+)'"
def conversion(x):
return x
......
......@@ -39,6 +39,6 @@
#define mkstr(s) #s
#define TEST_TYPE_COMPATIBLE(T1, T2) \
_Static_assert(!COMPATIBLE(T1, T2), "" mkstr(T2) " is " #T1);
_Static_assert(!COMPATIBLE(T1, T2), "" mkstr(T2) " is '" #T1 "'");
#define TEST_TYPE_IS(type) TEST_TYPE_COMPATIBLE(type, TEST_TYPE)
......@@ -23,5 +23,8 @@
#include "make_machdep_common.h"
#include <stddef.h>
_Static_assert(!COMPATIBLE(unsigned int, size_t), "size_t is unsigned int");
_Static_assert(!COMPATIBLE(unsigned long, size_t), "size_t is unsigned long");
#define TEST_TYPE size_t
TEST_TYPE_IS(unsigned int)
TEST_TYPE_IS(unsigned long)
TEST_TYPE_IS(unsigned long long)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment