C23
-
Modern C, C23 edition, now in print
At last, the new edition is now also available in print and e-pub versions, the contents is the same as described in the previous article. Find all the details at https://gustedt.gitlabpages.inria.fr/modern-c/ Continue reading
-
The provenance memory model for C
[The wordpress markdown inclusion does a very bad job, it seems, there have been some idiotic formatting errors. I hope that these are fixed, now.] Continue reading
-
A diagram of C23 basic types
This week on the C committee mailing list we had a discussion about how C’s types are organized into different categories. At the end I came up with a diagram with that organization. It basically translates the section “6.2.5 Types” of the C23 standard into a graph of inclusions. Sorry, it is probably a little Continue reading
-
Preprocessor meta-quotes with eĿlipsis
The new revision of eĿlipsis (20250219) has a lot of cleanups, bugfixes etc, but one thing I’d like to emphasize is a new feature that I’d call meta-quotes in lack for a better idea of a name that implement exemption of tokens from macro replacement. So in C that would interact with translation phase 4. Continue reading
-
Simple defer, ready to use
With this post I will concentrate on the here and now: how to use C’s future lifesaving defer feature with existing tools and compilers. Continue reading
-
The C23 edition of Modern C
The C23 edition of Modern C is now available for free download from https://hal.inria.fr/hal-02383654 And as before a dedicated page for the book may be found at https://gustedt.gitlabpages.inria.fr/modern-c/ where you also may find a link to download the code examples that come with the book. Continue reading
-
Braiding the spaghetti: implementing defer in the preprocessor
I already talked about a proposal for an extension of the C language calleddefer, that is prospected to either be published in a technicalspecification or the next revision, C2Y, of the C standard: EĿlipsis now implements a simple form of this feature by mixing some specific preprocessor extensions (in particular counters) with the usual macro Continue reading
-
Tail recursion for macros in C
In view of the addition of __VA_OPT__ first to C++ and now to C23, there had been interest in extending the C preprocessor to include recursion. The basic idea would be that __VA_OPT__ can be used as a test within a macro such as in the following Indeed, the __VA_OPT__ clause only inserts its contents Continue reading
-
EĿlipsis: a language independent preprocessor is released
EĿlipsis is an extension and continuation of the C preprocessor with theaim to be useful for other technical languages, be they programminglanguages or text processing languages. There were several goals when developing eĿlipsis: https://gitlab.inria.fr/gustedt/ellipsis the sources at INRIA’s gitlab server https://gustedt.gitlabpages.inria.fr/ellipsis documentation on the gitlab pages https://gitlab.inria.fr/gustedt/ellipsis/-/boards issue trackers on different boards Bugs if things Continue reading
-
#include __FILE__
Include recursion in C is possible and useful. Continue reading
