back
user profile

uecker

2,147karma·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
Maybe it is already considered an achievement if someone manages to write a program in Rust.
1y ago·view thread
comment
C23 now has #embed thanks JeanHeyd Meneide: https://godbolt.org/z/xYjsW6MWW
1y ago·view thread
comment
Debuggers can expand macros, and you can also look at the pre-processed output or even compile that (you can't the expanded form with templates). But I agree that if it becomes more complicated …
1y ago·view thread
comment
Probably yes. Macros are about equally bad than templates in my experience (although C++ people will disagree, I do not see much difference). But mostly I plan to just let the compiler specialize the…
1y ago·view thread
comment
Na, we will just remove this template nonsense.
1y ago·view thread
comment
For one of my C projects (ca. 450 c-files), full rebuild time on my (not super fast) laptop is just below 10 seconds (incremental builds < 1s). Compiling and linking all unit tests takes a second,…
1y ago·view thread
comment
It is difficult to imagine that compile-time interpretation of tests is faster than compiling and running them for anything more complex. And for trivial stuff it should not matter. Not being able to …
1y ago·view thread
comment
The linker invokes the compiler again.
1y ago·view thread
comment
A compiler can still have access to the internal layout in C via link-time optimization.
1y ago·view thread
comment
I think the real question is why not everybody has already moved to D, if it is so much better and can do all the great things. The answer is that all these things have trade-offs, including implement…
1y ago·view thread
comment
In C programs only the external definition of an interface goes into the header of a library but not implementation details (there could be headers intentionally exposing details for internal use, of …
1y ago·view thread
comment
At least moderately advanced text editors often interoperate with symbols tables, so you can jump to a definition. But even with grep, you can usually do it in a way where you differentiate between…
1y ago·view thread
comment
The opaque types in C are great though. And because no info leaks via header, you have very fast compilation. The y"ou write from scratch every time" is a weird statement. I do not delete my…
1y ago·view thread
comment
The C89 standard has "A computation involving unsigned operands can never overflou. because a result that cannot be represented b! the resulting unsigned integer type is reduced modulo the number…
1y ago·view thread
comment
I am actually ok with the conversions and C and think they are quite convenient. Unsigned in C is modular. I am not sure what you mean by the "latest C standards specify". This did not cha…
1y ago·view thread
comment
Yes, the C FE I write (in C) does exactly this and othen utputs in one pass a flattened intermediate code. I did not see at as AST because it does semantic analysis during parsing, but it sitll has al…
1y ago·view thread
comment
I work a lot with students who can not program well in C. I would say turning on -Wall is not a difficult problem for them. If it is, then using another programming language also does not help.
1y ago·view thread
comment
My point is that any kind of formal notation using symbols can be used to write incomprehensible gibberish. That this is possible does not tell you much about the quality of the formal notation used. …
1y ago·view thread
comment
In my experience the warnings work quite well for the programmers I know. Anyway, ranting on HackerNews does not get anything fixed: https://www.open-std.org/jtc1/sc22/wg14&#…
1y ago·view thread
comment
I don't get that C hate. That terse syntax can be misused to produce unreadable code in C, does not change that I usually find it more readable than more verbose syntax.
1y ago·view thread
comment
I am pretty sure somebody will do this. My guess is that it will make basically no difference, but the end result is likely less useful...
1y ago·view thread
comment
Why would you target a language that is less portable and less stable?
1y ago·view thread
comment
Clang and GCC just got the [[counted_by()]] attribute to help protect such structs in the kernel. But yes, native syntax for this would be nice.
1y ago·view thread
comment
I hope it is not "basically" dead. I just resubmitted it at the request of several people. And yes, for new APIs you could just change the order, but it does help also with legacy APIs. It …
1y ago·view thread
comment
I don't think any weird edge case is a problem when targeting C. You just do not produce such cases when emitting the code.
1y ago·view thread
comment
Double indirection arrays with multiple allocations are 25 years obsolete (ok, there are some use cases) but since C99 we prefer to do it like the parent. In your code link you over allocate memory, s…
1y ago·view thread
comment
C has arrays with more than one dimension. (but no direct support for strides). Of course, it is just the same thing as arrays of arrays.
1y ago·view thread
comment
Note that C++ has different rules than C. C has type changing stores that do not require memcpy for allocated storage (i.e. no declared type). Older compilers have plenty of bugs related to TBAA thoug…
1y ago·view thread
comment
Yes, type-changing stores are guaranteed by the C standard to work only for allocated storage. In practice no compiler makes a difference between declared and allocated storage. A bigger problem is th…
1y ago·view thread
comment
Any type-changing store to allocated storage has this property in C.
1y ago·view thread