c17

What rules are there for qualifiers of effective type?

不想你离开。 提交于 2021-01-28 11:32:51
问题 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 really relevant for effective type since the rules speak of lvalue access, meaning lvalue conversion that discards qualifiers. But what if the object is a pointer? Qualifiers to the pointed-at data aren't affected by lvalue conversion. Q1: What if the effective type is a pointer to qualified-type?

How does C17 want me to initialize my atomics?

我只是一个虾纸丫 提交于 2020-01-13 08:30:36
问题 The C17 standard deprecates ATOMIC_VAR_INIT from stdatomic.h , meaning it still supports it but would rather it not be used. What is the correct non-deprecated way of initializing atomics in C17? Same as non-atomic types: atomic_int foo = 42; Or something new? 回答1: C17 makes it ok to initialize atomics using the usual explicit initialization: atomic_int n = 42; C17 literally just dropped the two words "using ATOMIC_VAR_INIT" from the sentence in 7.17.2.1. 回答2: Based on that document, section

snprintf: Are there any C Standard Proposals/plans to change the description of this func?

允我心安 提交于 2019-12-11 08:53:49
问题 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 question - "Is snprintf() ALWAYS null terminating?"- is resolved? (Or how (using which links) can I determine by myself if there are any such Proposals? Is there any search engine that can show all the currently active Proposals about the snprintf function? The only link I currently know is this one -

What is C17 and what changes have been made to the language?

ε祈祈猫儿з 提交于 2019-12-03 01:52:04
问题 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 ISO version like C11, or just a codename used by the GCC team for some corrections in their compiler ? 回答1: According to GCC reference, C17 is actually a bug-fix version of the C11 standard with DR resolutions integrated. C17 , a bug-fix version of the C11 standard with DR resolutions integrated ,