From WikiChip
Editing c/c99
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
This page supports semantic in-text annotations (e.g. "[[Is specified as::World Heritage Site]]") to build structured and queryable content provided by Semantic MediaWiki. For a comprehensive description on how to use annotations or the #ask parser function, please have a look at the getting started, in-text annotation, or inline queries help pages.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
− | |||
'''C99''' is a past version of the [[C programming language]] standard which was ratified by ISO in 1999 and became '''ISO/IEC 9899:1999'''. The same standard was later also adopted by ANSI on May 22, 2000. C99 cancels and replaces the first edition, [[C89]], and [[Normative Addendum 1|NA1]]. | '''C99''' is a past version of the [[C programming language]] standard which was ratified by ISO in 1999 and became '''ISO/IEC 9899:1999'''. The same standard was later also adopted by ANSI on May 22, 2000. C99 cancels and replaces the first edition, [[C89]], and [[Normative Addendum 1|NA1]]. | ||
Line 14: | Line 13: | ||
== New headers == | == New headers == | ||
− | C99 introduced 6 new [[C standard library|standard headers]]: | + | C99 introduced 6 new [[C standard library|standard headers]]: [[tgmath.h - C|<tgmath.h>]], [[stdint.h - C|<stdint.h>]], [[stdbool.h - C|<stdbool.h>]], [[inttypes.h - C|<inttypes.h>]], [[fenv.h - C|<fenv.h>]], and [[complex.h - C|<complex.h>]]. |
== Restricted pointers == | == Restricted pointers == | ||
− | {{main| | + | {{main|Restricted pointers - C|l1=Restricted pointers}} |
− | C99 introduced the concept of restricted pointer to the C language through the introduction of the ''' | + | C99 introduced the concept of restricted pointer to the C language through the introduction of the '''[[restrict - C|restrict]]''' [[Reserved keywords - C|keyword]]. Given two pointers, if they do not point to two distinct objects, they are said to be ''aliases''. The ''restrict'' keyword establishes a special association between the pointer and the object it accesses, guaranteeing all accesses to the object it points to occur through that pointer or expressions based on that pointer. |
Since multiple pointers can point to the same object, compilers are often unable to make certain optimizations that require them to know that only a specific pointer has access to the object it points to. The restrict keyword was designed to aid such compiler issues. Consequently, various functions such as memcpy(), strcpy(), and strcat() have had their signatures changed to: | Since multiple pointers can point to the same object, compilers are often unable to make certain optimizations that require them to know that only a specific pointer has access to the object it points to. The restrict keyword was designed to aid such compiler issues. Consequently, various functions such as memcpy(), strcpy(), and strcat() have had their signatures changed to: | ||
Line 26: | Line 25: | ||
char *strcpy(char * restrict s1, const char * restrict s2); | char *strcpy(char * restrict s1, const char * restrict s2); | ||
char *strcat(char * restrict s1, const char * restrict s2); | char *strcat(char * restrict s1, const char * restrict s2); | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
</source> | </source> | ||
Line 180: | Line 38: | ||
| ACK || style="background:#FF6666;text-align:center;" | No Support || || | | ACK || style="background:#FF6666;text-align:center;" | No Support || || | ||
|- | |- | ||
− | | Clang || style="background:#99FF66;text-align:center;" | Complete || style="text-align:center;" | -std=c99 || | + | | Clang || style="background:#99FF66;text-align:center;" | Complete || style="text-align:center;" | -std=c99 || No extended identifier support<ref>[http://p99.gforge.inria.fr/c99-conformance/c99-conformance-clang-3.2.html C99 Conformance CLANG Test]</ref> |
|- | |- | ||
| GCC || style="background:#99FF66;text-align:center;" | Complete || style="text-align:center;" | -std=c99 || Supports everything<ref>[http://p99.gforge.inria.fr/c99-conformance/c99-conformance-gcc-4.7.html C99 Conformance GCC Test]</ref> | | GCC || style="background:#99FF66;text-align:center;" | Complete || style="text-align:center;" | -std=c99 || Supports everything<ref>[http://p99.gforge.inria.fr/c99-conformance/c99-conformance-gcc-4.7.html C99 Conformance GCC Test]</ref> | ||
Line 194: | Line 52: | ||
{{reflist}} | {{reflist}} | ||
− | + | [[Category:C programming language]] | |
− | |||
− | |||
[[Category:C standards]] | [[Category:C standards]] |