Skip to main content

Questions tagged [c23]

C23 is the informal name of the next standard of the C programming language. It replaces C17 and introduces some new features.

2 votes
1 answer
455 views

Is it considered normal that f = NAN may cause raising floating-point exceptions?

C2x (as well as previous): The macro NAN is defined if and only if the implementation supports quiet NaNs for the float type. It expands to a constant expression of type float representing a quiet ...
pmor's user avatar
  • 5,941
1 vote
2 answers
508 views

What is the definition of a "valid program"?

ISO/IEC 9899:202x (E) working draft — December 11, 2020 N2596, footnote 9: ... an implementation is free to produce any number of diagnostic messages, often referred to as warnings, as long as a ...
pmor's user avatar
  • 5,941
5 votes
1 answer
124 views

C2x: 6.9.2 External object definitions: why is "shall not be an incomplete type" placed in Semantics rather than in Constraints?

Follow-up question for: What is the rationale for "semantics violation does not require diagnostics"?. N2596 working draft — December 11, 2020 ISO/IEC 9899:202x (E), 6.9.2 External object ...
pmor's user avatar
  • 5,941
3 votes
1 answer
502 views

Is [[nodiscard]] any different from [[gnu::warn_unused_result]]?

I had some code that used the GCC extension [[gnu::warn_unused_result]] (a.k.a. __attribute__((__warn_unused_result__))). Now I attempted to use C2x's [[nodiscard]] and I got an incomprehensible ...
alx - recommends codidact's user avatar
2 votes
2 answers
1k views

Is there a char8_t in C?

I have searched in many sites and did not get anything. I know that char8_t is a keyword in C++ since C++20. I am trying to find out in C, are they typedef-ing unsigned char to char8_t in C23 (with ...
Sourav Kannantha B's user avatar
1 vote
1 answer
2k views

What's the point of the __unused attribute in C?

I've got a question. Let's say you define a function or variable in C. If you don't use it, the compiler generates a warning that this variable/function wasn't used. To suppress the warning, you use ...
Matthew Schell's user avatar

15 30 50 per page
1 2 3 4
5