Evan Haas

Results 63 issues of Evan Haas

The following is allowed by gcc/clang: ```c #define HEADER #include HEADER ``` arocc currently gives: ``` ./test.c:2:10: error: expected "FILENAME" or #include HEADER ^ ``` https://gcc.gnu.org/onlinedocs/cpp/Computed-Includes.html Relevant thing we're not...

enhancement

From the GCC docs for `-D name=definition`: > The contents of definition are tokenized and processed as if they appeared during translation phase three in a ‘#define’ directive. In particular,...

enhancement

See https://gcc.gnu.org/onlinedocs/gcc/Cast-to-Union.html This issues a warning controlled by `-Wgnu-union-cast` which is off by default

enhancement

I believe we might need a `decayed_attributed` type specifier - currently, decaying an attributed array turns it into a `.special_va_start` ```c __attribute__((aligned)) int foo[1] = {0}; int *bar = foo;...

bug
crash

Currently tabs are treated as having a width of 1, which means the diagnostic caret is misaligned if the line contains any tabs before the location being indicated. I don't...

enhancement

`.uninitialized_in_own_init` should be issued if a variable is used in its own initializer (there are some caveats, see the lines marked with `-Wuninitialized` in the `initializers.c` test case)

enhancement

> you may also declare the type of a variable as __auto_type. In that case, the declaration must declare only one variable, whose declarator must just be an identifier, the...

enhancement

Error message for invalid binary/octal constants could be improved: ```c int x = 0b19; int y = 019; ``` clang output: ``` test.c:1:12: error: invalid digit '9' in binary constant...

enhancement

The [Zig parser test](https://github.com/ziglang/zig/blob/08dc840247536cffb970b9fa3974017db44ed373/lib/std/zig/parser_test.zig#L5306) uses a clever technique to check for correct memory handling during error conditions. Parse once using unlimited memory, measure how much was actually used, then parse...

enhancement

```c #define foo(X) 1 bar #define bar(X) 2 foo foo(X)(Y)(Z) ``` gcc and clang expand this to: `1 2 1 bar` aro expands it to: `1 2 foo(Z)`

bug