国产精品天干天干,亚洲毛片在线,日韩gay小鲜肉啪啪18禁,女同Gay自慰喷水

歡迎光臨散文網(wǎng) 會(huì)員登陸 & 注冊(cè)

學(xué)習(xí)C預(yù)處理器(CPP)GNU C Preprocessor概述02

2023-02-16 13:29 作者:C20先生  | 我要投稿

C預(yù)處理器-概述原文

The C preprocessor, often known as?cpp, is a?macro processor?that is used automatically by the C compiler to transform your program before compilation. It is called a macro processor because it allows you to define?macros, which are brief abbreviations for longer constructs.

The C preprocessor is intended to be used only with C, C++, and Objective-C source code. In the past, it has been abused as a general text processor. It will choke on input which does not obey C’s lexical rules. For example, apostrophes will be interpreted as the beginning of character constants, and cause errors. Also, you cannot rely on it preserving characteristics of the input which are not significant to C-family languages. If a Makefile is preprocessed, all the hard tabs will be removed, and the Makefile will not work.

Having said that, you can often get away with using cpp on things which are not C. Other Algol-ish programming languages are often safe (Ada, etc.) So is assembly, with caution.?-traditional-cpp?mode preserves more white space, and is otherwise more permissive. Many of the problems can be avoided by writing C or C++ style comments instead of native language comments, and keeping macros simple.

Wherever possible, you should use a preprocessor geared to the language you are writing in. Modern versions of the GNU assembler have macro facilities. Most high level programming languages have their own conditional compilation and inclusion mechanism. If all else fails, try a true general text processor, such as GNU M4.

C preprocessors vary in some details. This manual discusses the GNU C preprocessor, which provides a small superset of the features of ISO Standard C. In its default mode, the GNU C preprocessor does not do a few things required by the standard. These are features which are rarely, if ever, used, and may cause surprising changes to the meaning of a program which does not expect them. To get strict ISO Standard C, you should use the?-std=c90,?-std=c99,?-std=c11?or?-std=c17?options, depending on which version of the standard you want. To get all the mandatory diagnostics, you must also use?-pedantic. See?Invocation.

This manual describes the behavior of the ISO preprocessor. To minimize gratuitous differences, where the ISO preprocessor’s behavior does not conflict with traditional semantics, the traditional preprocessor should behave the same way. The various differences that do exist are detailed in the section?Traditional Mode.

For clarity, unless noted otherwise, references to ‘CPP’ in this manual refer to GNU CPP.

學(xué)習(xí)C預(yù)處理器(CPP)GNU C Preprocessor概述02的評(píng)論 (共 條)

分享到微博請(qǐng)遵守國(guó)家法律
偃师市| 吴旗县| 获嘉县| 清水河县| 绍兴县| 房产| 兴安县| 井陉县| 吉安县| 新巴尔虎左旗| 柳江县| 务川| 启东市| 资兴市| 双柏县| 岳池县| 石泉县| 漯河市| 保康县| 年辖:市辖区| 穆棱市| 临朐县| 泗水县| 江西省| 大洼县| 尖扎县| 贞丰县| 高密市| 肇东市| 定边县| 嘉定区| 河北省| 松桃| 营山县| 大姚县| 习水县| 天柱县| 松滋市| 随州市| 新邵县| 平顶山市|