C11 _Generic support in Norcroft
Jeffrey Lee (213) 6048 posts |
One of the nice new features of C11 is the introduction of _Generic expressions. It’s also a feature which some aspects of the standard library are half-expected to rely upon: tgmath.h and stdatomic.h, both of which make heavy use of generic functions. Norcroft does have a Unfortunately, without _Generic (or similar), I don’t think it’s possible to provide a stdatomic.h implementation for Norcroft. |
David Gee (1833) 268 posts |
Doesn’t Norcroft still use CFront? If so it’s not really appropriate for modern use; elsewhere there have been “proper” C++ compilers since 1992 or earlier… |
Stuart Swales (1481) 351 posts |
Who’s writing C++ for the RISC OS ROM?… |
David Gee (1833) 268 posts |
Whoops — saw "C11” and mistook it for C++11. Sorry! |
Steffen Huber (91) 1953 posts |
Up until about 1992, there was only CFront and a few experimental C++ compilers. Starting in 1992, the first few “true” C++ compilers which approached production readyness became available (DEC IIRC, and Microsoft). Soon after that, we got a port of GCC 2.3.3 (g++) and Easy C++. Probably 1994/1995? C++ got an official standard as late as 1998, until then the world of C++ compilers was quite hit-and-miss – I remember working with an IBM C++ compiler on a PowerPC-based AIX multicomputer with three CPUs, and it was a nightmare of bugs and a wild mixture of “features” (exceptions somehow-supported-but-not-really, templates supported-but-only-simple-cases, STL-we-have-our-own-great-implementation-here-but-don’t-expect-it-to-work). And that was 1998. |
David J. Ruck (33) 1636 posts |
I was at UCL in 1987 which was one of the first UK universities to offer C++ as part of a computer science course. We used CFront on a Pyramid mini and then Sun 3/50 workstations, a year later Acorn C/C++ was released with the very same version of CFront. This was handy as I was able to do my projects on my own Archimedes 310, rather than fight over the limited number of Suns swapping their 2 or 4 MB of RAM over the 10Base2 Ethernet. Of course I had to make both Wimp and X Windows front ends, but it was still quicker to develop that way. Unfortunately Acorn’s CFront never gained any new functionality, and by 1989 native C++ compilers had left it for dead. It’s now so primitive, I think I only have one significant program which still compiles on it. I ended up having to downgrade to plain old C to write all my RISC OS code in the 90s. Even when a viable version of GNU G++ came along, Norcroft C compiled so much quicker I stuck with that on RISC OS, while continuing with C++ on Linux and Windows. |
Jeffrey Lee (213) 6048 posts |
Back on the topic of C, while reading up on the deficiencies in C11’s thread specification, I’ve also discovered that the |
David Gee (1833) 268 posts |
The first PC compiler was Zortech C++, back in 1988. By 1992, Borland’s Turbo C++ was available. Microsoft C++ came out in the same year; Visual C++ early in 1993. All of these were true compilers. I remember Digital’s C++ compiler, cxx. It was used at the university where I worked. It would compile and link a program with no main function. In this case it would simply run the first function in the file instead. |
Jeffrey Lee (213) 6048 posts |
DDE30 contains _Generic support (along with assorted other C18 bits). Hurrah! Many thanks, ROOL. Now I guess I should try and finish off that stdatomic implementation I was working on. |
Paolo Fabio Zaino (28) 1882 posts |
Got mine too Jeffrey, just in time for the weekend! almost time to play with your lib, SIMD math and DDE30… another epic weekend kindly ran on RISC OS :D Many thanks ROOL! |
Steve Revill (20) 1361 posts |
You’re welcome! |