back
user profile

uecker

2,141karma·1,822submissions·April 14, 2020
about
Computational Magnetic Resonance Imaging, Real-time Magnetic Resonance Imaging, GCC Contributor, BART Toolbox, Member of ISO C WG14
recent activity (1,822 total)
comment
In general, the C standard only requires a diagnostic for constraint violations.
3y ago·view thread
comment
The article is a boring rant with no substance. His main issue seems to be the realloc zero change which he claims breaks idiomatic code. But this is certainly not idiomatic code as it never worked …
3y ago·view thread
comment
auto is not allowed for a function declaration with block scope without the GCC extension.
3y ago·view thread
comment
We made VLA types and derived types (variably modified types) mandatory in C23. (but not VLAs on the stack as automatic variables which are still optional)
3y ago·view thread
comment
I do not think VLA are anymore poorly defined then most other stuff in the C standard. It generally allows a wide range of implementations. As a language features, it is has excellent properties. (aut…
3y ago·view thread
comment
C++ had this forever (I assume), but for C this would be a breaking change which we try very hard to avoid.
3y ago·view thread
comment
It is Sisyphean, but there also many synergies (I work on real-time computational imaging systems). And the specific things you mention were mostly not my work (I made typeof in GCC more coherent, whi…
3y ago·view thread
comment
So you want Vec to refer to struct Vec but only if there is no other type Vec defined before or until one is defined later? That would work, but might be a bit confusing.
3y ago·view thread
comment
Sorry, it was on my list of things to propose, but I did not have enough time (due to a job change). Others were more interested in lambdas.
3y ago·view thread
comment
Because it would break a lot of existing code.
3y ago·view thread
comment
I am exploring way on how to implement this in C (with some extensions) as a library: https://github.com/uecker/noplate Certainly not production ready.…
3y ago·view thread
comment
My software and Debian package uses nested functions. I use it because code quality improves a lot with nested functions. But yes, the executable stack is a problem. I had a patch for GCC to use fu…
3y ago·view thread
comment
I agree, this is one of the more important common extensions we are still missing.
3y ago·view thread
comment
VLA are exactly an array type that knows its length, i.e. a dependent type. VLAs on the stack had some issues, but pointers to VLAs, i.e. variably modified types are quite powerful. Language and comp…
3y ago·view thread
comment
If you have larger fixed size array you can get an error when you overflow the larger array. But this then does not necessarily prevent invalid accesses to the parts of the array which go beyond the a…
3y ago·view thread
comment
Yes this is something we need to work on: Some way to detect stack overflow or prevent it from happening in C. And obviously you need to understand the resource consumption of your algorithm, but this…
3y ago·view thread
comment
Stack allocation is much faster than heap allocation, and compared to fixed-size arrays VLAs save stack space. For example, a recursive divide-by-conquer algorithm that allocates arrays on the stack m…
3y ago·view thread
comment
Not only this, but also out of bounds accesses using UBSan: https://godbolt.org/z/q9qsax7qY (also compiler support is still improving)…
3y ago·view thread
comment
And I am part of WG14 (so a hapless goldbrick). The reason VLA were made optional to make implementing C easier, as C99 was not adopted quickly. Although the reason for the slow adoption were others. …
3y ago·view thread
comment
Maybe you did not realize this, but I somewhat helped with this effort. In the kernel it may make (some) sense. The overall idea that VLA are always bad is incorrect.
3y ago·view thread
comment
VLAs can enable precise bounds checking with the undefined behavior sanitizer. This is useful and you do not have precise bounds checking anymore when you replace it with a larger fixed size array. Al…
3y ago·view thread
comment
In my opinion the improved code quality and bounds checking you can get with VLAs are worth it. Yes, the an attacker should not control the size and one should use -fstack-clash-protection and when th…
3y ago·view thread
comment
The prices in summer were so high mainly because half of France nuclear plants were offline. Look, even the article you cite mentions this: "The largest Nordic nation became the region’s top expo…
3y ago·view thread
comment
The grid is for trade, so I am not sure what sense this complaint makes. Also France relies on imports sometimes. Electricity prices changing with production and demand is also exactly what market is …
3y ago·view thread
comment
So what? You are complaining that Germany still uses coal. This is a fair complaint (and one should complain about this), but Germany is in the middle of the transition to renewables and that in the…
3y ago·view thread
comment
Sorry, I am not interested what a nuclear shill posts on twitter. Here is the source for my numbers (which are the official ones). Sorry, in German but I assume you can guess the labels: https:/…
3y ago·view thread
comment
Germany is exiting both nuclear and coal. In the time from 2010 to 2022 where 14/17 of nuclear plants were shut down generation from coal was reduced from 263 TWh per year to 181 TWh. Renewables …
3y ago·view thread
comment
I use this technique a lot and it is very powerful.
3y ago·view thread
comment
Wind and solar are far from marginal: 50% renewables in 2022: https://www.energy-charts.info/charts/energy_pie/chart.htm?l... Prices are also lower than in France, but not…
3y ago·view thread
comment
See my comment to parent. There is an important lesson about not being misled by looking at the wrong data.
3y ago·view thread