Hunter Damron

Results 26 comments of Hunter Damron

@jyn514 I hate to say it, but I think the proper way to solve this is with complete/incomplete types as in #261. This is the error provided by clang: ```...

However, I did try returning an error from [`align`](https://github.com/jyn514/rcc/blob/a388f00/src/arch/mod.rs#L82) when the members array is empty and it solves this issue but fails test case https://github.com/jyn514/rcc/blob/a388f00/tests/runner-tests/decls/forward_declaration/0.c when a struct is declared...

Ahh, this is another case of calling `sizeof` on an incomplete struct. If I change the test [decls/forward_declaration/0.c](https://github.com/jyn514/rcc/blob/a388f00/tests/runner-tests/decls/forward_declaration/0.c) to call `sizeof(my_s)` in the main function, then it fails with the...

Sorry, I misspoke. In this case, it's calling `alignof` at https://github.com/jyn514/rcc/blob/a388f00/src/ir/static_init.rs#L32. To be honest, I don't fully understand what `store_static` does though.

The `Location`s of `#define`s are stored in a map somewhere already, I assume? So could we instead add an `Option` member to `Token::Id` which points to where it which macro...

Or if the `Location`s of `#define`s aren't already stored somewhere, then [`lex::replace::Definitions`](https://github.com/jyn514/rcc/blob/ae5ac8/src/lex/replace.rs#L15) could be changed from ```rust pub type Definitions = HashMap; ``` to ```rust pub type Definitions = HashMap;...

It passed the tests..? I'm confused how if it depended on ##

Hmm. I thought I ran it on my Ubuntu machine but maybe not. Or it could be different there too.

I don't think ## will be too hard to implement. But maybe that's a problem for after you finish separating out the preprocessor.