什么是C,C99,ANSI C和GNU C之间的区别?关于C的各种版本的一般混乱 [英] What is the difference between C, C99, ANSI C and GNU C? A general confusion regarding the various versions of C

查看:229
本文介绍了什么是C,C99,ANSI C和GNU C之间的区别?关于C的各种版本的一般混乱的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在<一开始编程实践href=\"http://www.$c$cchef.com/problems/easy?sort_by=SuccessfulSubmission&sorting_order=desc\">$c$cchef并已通过C和C99之间的的区别混淆。什么是C平均在这里?它是C89?查看语言在此提交。它包含了C和C99。

I have started programming practice on codechef and have been confused by the difference between C and C99. What does C mean here? Is it C89? Check the languages at the bottom of this submit. It contains both C and C99.

我在互联网上的一些所谓的GNU C.发现是否有不同的C为Linux / Unix系统?这些标准的C类标准由ANSI?我也看过一些地方C99严。这是什么?

I found on the internet something called GNU C. Is there a different C for linux/unix systems? Are these compliant to the C standards by ANSI? I have also read in some places "C99 strict". What is this?

是否有使用其他不同的标准的C?是不是有什么称为C 4.3.2或者是在当前使用的gcc版本?

Are there any other different standards of C in use? Is there something called C 4.3.2 or is it the gcc version in current use?

编辑:

,的的帮助。我会更多的搜索和编辑没有回答的事情。

This, This, This helped. I'll search more and edit the things that are left unanswered.

我不是一个编程新手。我知道C语言是什么。我知道,有不同的C类标准由ANSI C89一样,C99和C11。

I am not a programming newbie. I know what C language is. I know that there are the different C standards by ANSI like C89, C99 and C11.

推荐答案


  • 标准化之前,一切都通常被称为K&放大器; RC的名著后,用丹尼斯里奇,C语言的发明者,作为作者之一。这是C语言,从1972年至1989年。

  • Everything before standardization is generally called "K&R C", after the famous book, with Dennis Ritchie, the inventor of the C language, as one of the authors. This was "the C language" from 1972-1989.

    第一个C标准发布1989年全国在美国,其国家标准协会制订的ANSI。此版本被称为C89或ANSI-C。从1989- 1990年,这是C语言。

    The first C standard was released 1989 nationally in USA, by their national standard institute ANSI. This release is called C89 or ANSI-C. From 1989-1990 this was "the C language".

    一年后,美国的标准是国际公认和ISO(ISO 9899:1990)上发表。此版本被称为C90。从技术上讲,它是相同的标准为C89 / ANSI-C。在形式上,它取代C89 / ANSI-C,使它们过时。从1990- 1999年,C90是C语言。

    The year after, the American standard was accepted internationally and published by ISO (ISO 9899:1990). This release is called C90. Technically, it is the same standard as C89/ANSI-C. Formally, it replaced C89/ANSI-C, making them obsolete. From 1990-1999, C90 was "the C language".

    请注意,自1989年以来,ANSI还没有任何与C语言。程序员仍然在谈论ANSI C,一般还没有得到有关这意味着什么线索。 ISO拥有C语言,通过标准ISO 9899。

    Please note that since 1989, ANSI haven't had anything to do with the C language. Programmers still speaking about "ANSI C" generally haven't got a clue about what it means. ISO "owns" the C language, through the standard ISO 9899.

    在1999年,C标准进行了修订,许多事情发生了变化(ISO 9899:1999)。这个标准的版本被称为C99。从1999-2011,这是C语言。大多数C编译器仍遵循这个版本。

    In 1999, the C standard was revised, lots of things changed (ISO 9899:1999). This version of the standard is called C99. From 1999-2011, this was "the C language". Most C compilers still follow this version.

    在2011年,C标准再被更改了(ISO 9899:2011)。此版本称为C11。这是目前的C语言的定义。

    In 2011, the C standard was again changed (ISO 9899:2011). This version is called C11. It is currently the definition of "the C language".

    C99严可能是指一个编译器设置强制编译器按照字母的标准。有一个长期的符合条件的实现的C标准。本质上,它的意思是:这个编译器实际上实现了正确的C语言。即正确实现C语言程序被正式称为的严格符合程序

    "C99 strict" likely refers to a compiler setting forcing a compiler to follow the standard by the letter. There is a term conforming implementation in the C standard. Essentially it means: "this compiler actually implements the C language correctly". Programs that implement the C language correctly are formally called strictly conforming programs.

    GNU C意味着两件事情。无论是C编译器本身自带的GNU编译器集合(GCC)的一部分。或者,它可能意味着GCC C编译器使用非标准的默认设置。如果用 GCC编译program.c 那么你不按照C标准编译,而是一个非标准的GNU设置,这可能是GNU简称C。例如,整个Linux内核是非标准的GNU C制成,而不是在标准C

    "GNU C" can mean two things. Either the C compiler itself that comes as part of the GNU Compiler Collection (GCC). Or it can mean the non-standard default setup that the GCC C compiler uses. If you compile with gcc program.c then you don't compile according to the C standard, but rather a non-standard GNU setup, which may be referred to as "GNU C". For example, the whole Linux kernel is made in non-standard GNU C, and not in standard C.

    如果您想根据C标准来编译程序,应键入的gcc -std = C99 -pedantic-错误。如果你的GCC版本支持与C11 C99替换

    If you want to compile your programs according to the C standard, you should type gcc -std=c99 -pedantic-errors. Replace c99 with c11 if your GCC version supports it.

    这篇关于什么是C,C99,ANSI C和GNU C之间的区别?关于C的各种版本的一般混乱的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆