Fixed warning.

This commit is contained in:
Christoffer Lerno
2020-07-09 16:10:02 +02:00
parent dc86c21210
commit 3e5fefdb64
2 changed files with 5 additions and 1 deletions

View File

@@ -1176,7 +1176,7 @@ static inline bool decl_poison(Decl *decl) { decl->decl_kind = DECL_POISONED; de
static inline bool decl_is_struct_type(Decl *decl) static inline bool decl_is_struct_type(Decl *decl)
{ {
DeclKind kind = decl->decl_kind; DeclKind kind = decl->decl_kind;
return kind == DECL_UNION | kind == DECL_STRUCT | kind == DECL_ERR; return (kind == DECL_UNION) | (kind == DECL_STRUCT) | (kind == DECL_ERR);
} }
static inline DeclKind decl_from_token(TokenType type) static inline DeclKind decl_from_token(TokenType type)
{ {

View File

@@ -5,11 +5,15 @@
#include "compiler_tests/tests.h" #include "compiler_tests/tests.h"
#include "utils/lib.h" #include "utils/lib.h"
static int version = 100;
int main(int argc, const char *argv[]) int main(int argc, const char *argv[])
{ {
// First setup memory // First setup memory
memory_init(); memory_init();
DEBUG_LOG("Version: %d", version);
// Init the compiler // Init the compiler
compiler_init(); compiler_init();