larmel / lacc

A simple, self-hosting C compiler
MIT License
872 stars 64 forks source link

Assert macro fail in compile.c #29

Closed Cube9999 closed 3 years ago

Cube9999 commented 3 years ago

Description

While compiling a project ([LINK DELETED]) I get the following error while trying to compile lexer.c: image

This seems to only occur in lacc. As it compiles just fine in gcc and clang

Platform

Ubuntu 21.04 x86_64. Lacc built with gcc 10

Cube9999 commented 3 years ago

I tried compiling some of my own projects (for example, https://github.com/Cube9999/coreutils) and lacc worked flawlessly. So I do not think it's an issue with my build.

larmel commented 3 years ago

Thanks for reporting this, it is clearly a bug (assert failure is always a compiler bug). I suppose you made some workaround to your issue, but I implemented a fix with 830c12aa.

Cube9999 commented 3 years ago

Yes, I made a workaround after this. Thank you for pushing your fix!