diff options
author | Michael Forney <mforney@mforney.org> | 2024-03-22 01:06:21 -0700 |
---|---|---|
committer | Michael Forney <mforney@mforney.org> | 2024-03-22 01:06:21 -0700 |
commit | c54ba0bc38a2dc49d4090611c60b31aa801e000c (patch) | |
tree | 2a36eac023826bb43377a6f76e467054d94e6420 | |
parent | e56d50bb88c984af8e1c45fa51aec3ee1f9f505d (diff) |
doc/c23: Document typeof/typeof_unqual
-rw-r--r-- | doc/c23.md | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -40,6 +40,16 @@ and hexadecimal, using syntax like `0b01101011`. C23 allows empty initializers to initialize an object as if it had static storage duration. +## [N2927]: Not-so-magic typeof for C + +C23 adds the `typeof(E)` type specifier to specify type of expression +`E`. Arrays and function designator expressions do not decay into +pointers, just like when used with `sizeof`. You can use a typename +with `typeof` to specify that same type. + +C23 also introduces `typeof_unqual`, which behaves the same as +`typeof` except that the specified type is unqualified. + ## [N3029]: Improved Normal Enumerations C23 allows enumerators outside the range of `int`. When an enum @@ -68,5 +78,6 @@ used inside the enum. [N2510]: https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2510.pdf [N2549]: https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2549.pdf [N2900]: https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2900.htm +[N2927]: https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2927.htm [N3029]: https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3029.htm [N3030]: https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3030.htm |