최근 수정 시각 : 2025-03-23 15:13:38

C(프로그래밍 언어)/표준


파일:상위 문서 아이콘.svg   상위 문서: C(프로그래밍 언어)
1. 개요2. ANSI C3. ISO 표준
3.1. C903.2. C953.3. C993.4. C113.5. C173.6. C23
4. 기타 비표준
4.1. Embedded C4.2. MSVC 확장4.3. GCC 확장4.4. Small C
5. 슈퍼셋 언어

1. 개요

C2세대 컴퓨터의 역사와 함께할 정도로 오래된 언어임과 동시에 현존하는 거의 대부분의 하드웨어와 운영체제에 다양하게 이식(port)된 언어이기도 하다.

이에 따라 역사적으로 수많은 발전과 진화를 거듭해왔고, 동시에 난립하는 운영체제/컴파일러 구현체간의 이식성을 높이기 위해 하나의 통일된 표준에 대한 수요가 점차 증가하게 되었다.

사실상 표준으로 취급받던 K&R C가 존재하긴 했으나, K&R은 엄밀한 명세가 아니었고 결국 하드웨어 제조사들(대표적으로 IBM)의 독자 표준과 확장 문제를 해결하기 위해 1989년, 최초의 C언어 표준인 ANSI C가 탄생하게 된다. K&R 등 ANSI C 이전의 역사에 대한 내용은 C(프로그래밍 언어)/역사 문서 참고.

2. ANSI C

<rowcolor=#fff> 약칭 공개 연도 정식 표준명 이명
ANSI C1989년ANSI X3.159-1989C89

1983년, ANSI는 C의 파편화된 명세를 표준화하기 위해 하드웨어 제조사, 컴파일러 제공자(vendor) 그리고 C 프로그래머 등 관련 각 분야를 대표하는 50명의 임원을 모아 X3J11 위원회를 발족했다.[1] 해당 표준이 정보통신 분야였기에 ANSI 하위의 ASC X3(Accredited Standards Committee X3, 현 INCITS)에 할당되었고, 이는 ANSI C의 정식 표준 번호가 ANSI X3.159-1989임에서 확인할 수 있다.[2]

주 목적은 호환성 마련이었기 때문에, 당시 C언어 개발 환경에서 자주 또는 관습적으로 존재하는 여러 흔한 요소들을 표준화하면서 동시에 구현체별로 다른 내용들을 최소화하는 방향으로 작성되었다.[3] 전반적으로는 TCPL의 부록 A에 담겨 있고 흔히 K&R로 유명한 <The C Reference Manual>을 기반으로 한 다음[4] 널리 쓰이는 비표준 내용을 추가하거나 기존 내용을 수정하는 방식이었는데, K&R과 완벽히 호환되지 않는 이유는 K&R 매뉴얼도 부정확하거나 해석에 따라 모호할 수 있는 부분이 다수 있었기 때문이었다.[5] 이러한 내용들 다수는 표준화되면서 implementation-defined behavior나 undefined behavior로 남겨지기도 했다. 이외에도 UNIX 계열 운영체제에 종속적이라 호환성을 저해하는 API들은 표준 라이브러리 명세에서 분리해 IEEE 1003 위원회에 맡겼는데, 여기서 훗날 만들어진 게 바로 POSIX 표준이다. 이 때문에 POSIX는 ANSI C 표준 라이브러리의 superset으로 동작하게끔 설계되었다.[6]

해당 표준은 1989년 12월 14일에 작업이 완료되었고 1990년 봄에 발표되었다.[7]

3. ISO 표준

3.1. C90

<rowcolor=#fff> 약칭 공개 연도 정식 표준명 이명
C901990년ISO/IEC 9899:1990ISO C
<rowcolor=#fff> 기술 정정
TCor11994년ISO/IEC 9899:1990/Cor.1:1994
TCor21996년ISO/IEC 9899:1990/Cor.2:1996

3.2. C95

<rowcolor=#fff> 약칭 공개 연도 정식 표준명 이명
C951995년ISO/IEC 9899:1990/Amd.1:1995-

3.3. C99

<rowcolor=#fff> 약칭 공개 연도 정식 표준명 이명
C991999년ISO/IEC 9899:1999C9X
<rowcolor=#fff> 기술 정정
TCor12001년ISO/IEC 9899:1999/Cor.1:2001
TCor22004년ISO/IEC 9899:1999/Cor.2:2004
TCor32007년ISO/IEC 9899:1999/Cor.3:2007

3.4. C11

<rowcolor=#fff> 약칭 공개 연도 정식 표준명 이명
C112011년ISO/IEC 9899:2011C1X
<rowcolor=#fff> 기술 정정
TCor12012년ISO/IEC 9899:2011/Cor 1:2012

3.5. C17

<rowcolor=#fff> 약칭 공개 연도 정식 표준명 이명
C172018년ISO/IEC 9899:2018C18

3.6. C23

<rowcolor=#fff> 약칭 공개 연도 정식 표준명 이명
C232024년ISO/IEC 9899:2024C2X

4. 기타 비표준

4.1. Embedded C

4.2. MSVC 확장

4.3. GCC 확장

4.4. Small C

5. 슈퍼셋 언어


[1] The X3J11 Committee represents a cross-section of the C community: it consists of about fifty active members representing hardware manufacturers, vendors of compilers and other software development tools, software designers, consultants, academics, authors, applications programmers, and others. #@[2] This task fell under the responsibility of the Accredited Standards Committee X3 (ASC X3), Information Technology, and resulted in ANSI X3.159-1989: Programming Language C (...) Please note that ASC X3 is now the International Committee for Information Technology Standards (INCITS), an ANSI-accredited standards developing organization devoted to information and communication technology. #[3] The Committee's overall goal was to develop a clear, consistent, and unambiguous Standard for the C programming language which codifies the common, existing definition of C and which promotes the portability of user programs across C language environments. The X3J11 charter clearly mandates the Committee to codify common existing practice. SS[4] The Base Document for Section 3 (Language) was ``The C Reference Manual'' by Dennis M. Ritchie, which was used for several years within AT&T Bell Laboratories and reflects enhancements to C within the UNIX environment. A version of this manual was published as Appendix A of The C Programming Language by Kernighan and Ritchie (K&R). SS[5] First, K&R, which has served as the language specification for almost all C translators, is imprecise in some areas (thereby allowing divergent interpretations). SS[6] The X3J11 Committee has been working with IEEE 1003 to resolve potential areas of overlap or conflict between the two Committees. The result of this coordination has been to divide responsibility for standardizing library functions into two areas. Those functions needed for a C implementation in any environment are the responsibility of X3J11 and are included in the Standard. IEEE 1003 retains responsibility for those functions which are operating-system-specific; the (POSIX) standard will refer to the ANSI C Standard for C library function definitions. SS[7] ratified on December 14, 1989 and published in the spring of 1990. SS