0.10 Configuring your compiler: Compiler extensions

주홍영·2022년 3월 10일
0

Learncpp.com

목록 보기
10/199

https://www.learncpp.com/cpp-tutorial/configuring-your-compiler-compiler-extensions/

Compiler마다 다른 버젼의 언어와의 compatibility를 위해 독자적인 변화를 실행한다
이를 compiler extension이라고 한다
이로 인해 특정상황에서 C++ standard가 정의하고 있는 규칙과 다른 행동을 보여줄 수도 있다

compiler extension을 사용하며 프로그램을 쓰면 c++ standard와 호환이되지 않을 수 있다
이로인해 다른 compiler에서 compile되지 않는 수가 생긴다

Frustratingly, compiler extension은 기본적으로 활성화가 되어있다
이는 새로 배우는 사용자는 어떠한 기능이나 행동이 c++ standard라고 생각했는데
사실은 아닌 경우가 발생한다. 이는 컴파일러의 지나친 관대함으로 인해 발생한다

따라서 compiler extension은 절대 필요치 않기에 우리는 이 기능을 끄는 것을 추천한다

Disabling compiler extensions

To disable compiler extensions, right click on your project name in the Solution Explorer window, then choose Properties:

From the Project dialog, first make sure the Configuration field is set to All Configurations.

Then, click C/C++ > Language tab, and set Conformance mode to Yes (/permissive-).

**** 단어장

Compatibility : 호환성
Frustratingly : 절망적이게도
over-permissive : 지나치게 관대한
permissive : 관대한
ex) when in fact their compiler is simply over-permissive.
conformance : 일치, 부합

profile
청룡동거주민

0개의 댓글