Jens Gustedt's Blog

May 9, 2017

gcc doesn’t inline position independent code properly

Filed under: C11, C99, compiler optimization, Modular C, rants — Jens Gustedt @ 12:27

When compiling position independent code, PIC, the gcc compiler fails to inline many functions that have an external name, that is that are not declared static. While this is conforming to the C standard, this is a complete blow to a lot of optimization efforts that I have put into my code in many places.



March 9, 2017

Unicode operators for C

Filed under: C11, feature request, Modular C, rants — Jens Gustedt @ 16:54

C11 has added a certain level of Unicode support to C, but I think for C2x it will be time to go a step further and put C in line with general usage of special characters as they are normalized by Unicode. In particular, it is time to get rid of restrictions in operator naming that stem from the limited availability of special characters 30 years ago, when all of this was invented.


December 18, 2013

right angle brackets: shifting semantics

Filed under: C++, rants — Jens Gustedt @ 23:29

As I showed int this post, using > as right angle brackets was not a particularly good idea, but trying to patch this misdesign even makes it worth. After a bit of experimenting I found an expression that is in fact valid for both, C++98 and C++11, but that has a different interpretation in both languages:

fon< fun< 1 >>::three >::two >::one

So if you have to maintain a large code base with templates that depend on integers that are perhaps produced automatically by some tools, be happy, you will not be out of work for a while: changing your compiler to C++11 might change the semantics of your code.


December 15, 2013

A disimprovement observed from the outside: right angle brackets

Filed under: C++, rants — Jens Gustedt @ 23:16

It is long time that I didn’t look into C++, I have to admit. By coincidence I recently unearthed a hilarious example that I had once written that shows the difficulty of parsing some C++ code, as well as for compilers as for us poor humans. It all starts with the >> operator that (supposedly until C++11) could cause problems as in the following:

toto< tutu< 3 >> A;

Here the >> is (was) interpreted as `right shift’ operator and thus this code would create a compile time error. C++11 changed this by introducing the possibility that in that case the right-shift-operator-token closes the two template angle brackets. The argument is that shift operators in template arguments are rare (which is probably true) and so this sacrifices some valid uses of that operator for the sake of causing less brain damage to C++ newbies.


July 11, 2012

Drop out: there is not opt out button for dropbox

Filed under: rants — Jens Gustedt @ 06:51

Recently someone sent me a “share” request on dropbox and used one of my email addresses that is not yet linked to that service, and for which I don’t want to ever use dropbox. I then redirected that person to use another mail account for that, and the person did. Everything fine, so far.

But then days later dropbox kindly reminded me that there was this request pending. I guess that spam would have gone on for a while, if I hadn’t stopped it.

So I went to the dropbox site to opt out of their service for this particular email. It took me a while to realize that the expectation that there might exist just a little button for that was far too naive, there is no such thing on their site. I am sure that technically such a button would not be much of a problem, basically just the same as subscribing for such a service. (You’d have to verify the email, somehow.)

So I had to go through their “help” system, which took actually two entire days until I got through to a human. Finally they put that mail address on a black list.

In summary not too good an experience as a “non-user”. I already would rate the services that they offer to real customers relatively bad:

  • pro: a file sharing service, even free of charge for all the use I had for now
  • contra: ridiculous management of access rights:
    • it allow your “friends” to inadvertently delete your files when “moving” them on their laptop disk, instead of copying them
    • It allows your friends to silently accumulate GigaBytes of files on your hard disk, by collecting files in shared directories that basically are never cleaned up. (currently 3.4 GiB on my hard disk)
  • contra: no encryption or data protection

I will probably think again before I send an “invite” to share some files on dropbox, this might be a real privacy intrusion.

Create a free website or blog at