c17 Questions

2

Solved

Is the following a standard C function declaration according to ISO/IEC 9899:2017 (c17)? int foo(int (bar), int (baz)); If so, please point me to the section in the standard that defines this. In ...
Acephalous asked 14/3, 2024 at 21:16

3

Solved

Does the definition int a = 0, b = a++, c = a++; have defined behavior in C? Or almost equivalently, does the comma in an object definition introduce a sequence point as for the comma operator in e...
Schaper asked 9/8, 2023 at 12:10

2

So I was re-reading C17 6.5/6 - 6.5/7 regarding effective type and strict aliasing, but couldn't figure out how to treat qualifiers. Some things confuse me: I always assumed that qualifiers aren't...
Laurellaurella asked 18/12, 2020 at 12:13

1

Solved

The fact that a struct with a flexible array member is a type with which a variable can be declared and to which sizeof can be applied leads to an unusual behavior in the following program. file fa...
Infantine asked 26/8, 2022 at 7:33

2

Solved

If the next representable value after -0.0 is +0.0, then why nextafter(-0.0, INFINITY) does not return +0.0?
Introduction asked 28/6, 2021 at 9:44

1

Solved

Is there any C compiler able to detect* the violation of a "strictly conforming program"? * under some option, for example, --accept-only-strictly-conforming-program If no, then whi...
Precision asked 3/6, 2021 at 11:15

4

Solved

In the late draft of C11 [C11_N1570] and C17 [C17_N2176] I fail to find the proof of the following (which, I believe, is commonly known): sizeof(short) <= sizeof(int) <= sizeof(long) <= si...
Diluvial asked 21/5, 2021 at 5:20

2

Solved

I am quite surprised that C does not guarantee that certain (constant) expressions are evaluated at compile (translation) time. C11 (6.6 Constant expressions) (emphasis added): A constant expressi...
Stroller asked 26/4, 2021 at 10:53

2

Solved

Why not all the standard headers are preceded with std prefix? I.e. why complex.h and not stdcomplex.h?
Agace asked 25/2, 2021 at 17:16

1

Solved

The following code attempts to use array indexing on a string literal in two different constant contexts: static char x = "abcx"[3]; _Static_assert ("abcx"[3] == 'x', "..."); Judging by Compile...
Bivens asked 15/6, 2019 at 15:38

1

Solved

In C++ it's recommended to use lock_guard as it ensures when the object is destroyed it unlocks the mutex. Is there a way to implement the same thing in C? Or do we have to just implement it manua...
Hectare asked 27/3, 2019 at 12:11

2

Solved

After stumbling across the question "Why are these constructs using pre and post-increment undefined behavior?" today I decided to grab the newest draft for the next C standard I could find and rea...
Bascom asked 25/11, 2018 at 14:22

2

Solved

As I was checking news about GCC 8, I saw that they added support for the 2017 version of the C language (not C++17, really C17). But I can't find any information about it on Internet. Is it a new...
Orlando asked 28/11, 2017 at 10:57

1

Solved

Are there any Proposals (or plans) to the C language Standard to change the (last sentence of the) description of the snprintf function such that the ambiguity described in this my answer to the qu...
Tove asked 24/5, 2018 at 17:36
1

© 2022 - 2025 — McMap. All rights reserved.