| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Here's what the C standard[1] says about the conditional operator:
```
if one operand is a null pointer constant, the result has the type of
the other operand; otherwise, one operand is a pointer to void or a
qualified version of void, in which case the result type is a
pointer to an appropriately qualified version of void.
``
But actually, some codebases rely on things like 'x ? &foo.memb : NULL'
to have the type of `&foo.memb`, and not `void *`...
[1]: ISO/IEC 9899:TC3 ยง6.5.15
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
Missing: static eval of complex values,
Silly inefficient implementation of equality comparisons between them
The whole thing is pretty inefficient without proper aggregate mem2reg
anyway
|
| |
|
|
|
|
| |
GNU extension. Previously was overloading arraylength==0 to mean unsized
array, now they are distinct with the type flag TFUNKNOWN marking
unsized arrays & aggregates.
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
If a function is stashed for inlining and inlined in all of its
callsites or unused, it never ends up in the object file. If any symbol
reference to it is emitted, then it must be de-inlined (rematerialized),
and this is done near the end before emitting the actual object file.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
It was meant as a micro-optimization but actually keeping it in sync was
annoying. This for example was broken:
```
extern enum foo { ... } g_foo;
enum foo g_foo;
```
|
| |
|
|
|
| |
Is much nicer. I don't know whether I want to do it for the other int
types too. char and uchar are fine as bytes. u/short -> u/s16int, maybe.
|
| |
|
|
|
| |
The motivation is for aarch64 msub/madd instrs, for isel to produce. But
it should be useful for other things too.
|
| |
|
|
| |
And add some GCC predefs like __SIZE_TYPE__, __LONG_SIZE__, etc
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
`const int x[]` was being treated as `const int x[const]`, which is
wrong, and matters when `x` is a function parameter that really decays
to a pointer (`int const *const x`)
|
| |
|
|
|
| |
OpenBSD enforces read xor execute (XOM) even in x86-64. Not aware of any
other platforms that do this.
|
| |
|
|
|
| |
The intent is for _Alignas declarations but those aren't implemented
yet. And initializing that field in declarator() can mess with .sym.
|
| | |
|
| |
|
|
| |
Looks nicer
|
| | |
|
| | |
|
| |
|