Author Topic: C2x  (Read 112 times)

lerno

  • Full Member
  • ***
  • Posts: 218
    • View Profile
C2x
« on: November 14, 2018, 01:49:03 AM »
Very important to look at and incorporate: https://gustedt.wordpress.com/2018/11/12/c2x/

bas

  • Full Member
  • ***
  • Posts: 209
    • View Profile
Re: C2x
« Reply #1 on: November 27, 2018, 09:55:51 AM »
Which part exactly?

lerno

  • Full Member
  • ***
  • Posts: 218
    • View Profile
Re: C2x
« Reply #2 on: November 29, 2018, 02:43:59 PM »
All parts that will be added to C2x since this is part of the "official" evolution of C. If there has been enough need to include this in the next C revision, it should probably go into C2 as well.

For example: http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2257.htm#dr_476

Also the ones not yet accepted, like: http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2269.pdf

bas

  • Full Member
  • ***
  • Posts: 209
    • View Profile
Re: C2x
« Reply #3 on: November 30, 2018, 11:58:49 AM »
I always find it funny that most language seem to do well without all these big formal specification documents.

If you have concrete proposals, just make them, but there is enough work already to make this a priority..

lerno

  • Full Member
  • ***
  • Posts: 218
    • View Profile
Re: C2x
« Reply #4 on: December 07, 2018, 06:22:33 PM »
1. Follow the changes here: http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2257.htm#dr_476. Volatile should apply to the access of an object through an lvalue marked volatile.

2. Issues supporting u128, i128, u256, i256 should be considered so that C2 doesn't end up with the same problems. Also, consider emulated 128, 256 integer, and a way for supporting optional integers above width of 64 bits http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2303.pdf

3. Issues with atomics that have different guarantees for ++x and x++: http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1955.htm

4. User defined attributes: http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2269.pdf This could be useful in a macro system, where one could – for example – create a serialization system based on macros and these user defined attributes.

5. "Add a new calling conventions with error return for library functions that avoids the use of errno" relevant for updated error handling in C2.

6. "constexpr to evaluate expressions at compile time as in C++" relevant for semantic macros.

7. Introduce UTF-8 character type: http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2231.htm

Some of these are mostly relevant when compiling to LLVM since it affects LLVM code generation.

bas

  • Full Member
  • ***
  • Posts: 209
    • View Profile
Re: C2x
« Reply #5 on: December 16, 2018, 10:56:47 AM »
Importing these changes will take careful consideration. Many changes however only become relevant when we generate IR code and not C code.
This goes (I think) for 1, 3

2. TBD
4. C2 has an extensible attribute system already, so this is pretty much solved
5. I don't see this ever happening in C also
6. agreed, will be included in C2's macro system partly also.
7. UTF-8 discussion are on the forum, but not really pressing in the current phase.