<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    posts - 134,comments - 22,trackbacks - 0

    看到內(nèi)核代碼中有很多地方都使用了#if defined(),可是卻找不到這個(gè)東東的定義,主要是define()。它和我們常用的#ifdef有什么不同嗎?

    4.2.3 Defined The special operator defined is used in #if and #elif expressions to test whether a certain name is defined as a macro. defined name and defined (name) are both expressions whose value is 1 if name is defined as a macro at the current point in the program, and 0 otherwise. Thus, #if defined MACRO is precisely equivalent to #ifdef MACRO.

    defined is useful when you wish to test more than one macro for existence at once. For example,

    #if defined (__vax__) || defined (__ns16000__)

    would succeed if either of the names __vax__ or __ns16000__ is defined as a macro.

    Conditionals written like this:

    #if defined BUFSIZE && BUFSIZE >= 1024

    can generally be simplified to just #if BUFSIZE >= 1024, since if BUFSIZE is not defined, it will be interpreted as having the value zero.

    If the defined operator appears as a result of a macro expansion, the C standard says the behavior is undefined. GNU cpp treats it as a genuine defined operator and evaluates it normally. It will warn wherever your code uses this feature if you use the command-line option -pedantic, since other compilers may handle it differently.
    posted on 2010-07-27 14:22 何克勤 閱讀(2808) 評(píng)論(1)  編輯  收藏 所屬分類(lèi): C/C++

    FeedBack:
    # re: #if defined()的含義(ZZ)[未登錄](méi)
    2011-11-04 16:43 | jack
    it's usefull   回復(fù)  更多評(píng)論
      
    主站蜘蛛池模板: 亚洲AV无码成人网站在线观看| 亚洲gay片在线gv网站| 国产精品亚洲lv粉色| 精品熟女少妇aⅴ免费久久| 1a级毛片免费观看| 免费在线观看污网站| 久久亚洲sm情趣捆绑调教| 国产AV无码专区亚洲AV蜜芽| 日韩av无码久久精品免费| 四虎国产精品免费久久影院| 久久精品国产亚洲精品2020| 最好2018中文免费视频| 亚洲免费二区三区| 国产a v无码专区亚洲av| 亚洲日本久久一区二区va| 91在线视频免费观看| 国产精品深夜福利免费观看| 亚洲黄色在线观看| www.av在线免费观看| aa级一级天堂片免费观看| 国产亚洲精品无码成人| 国产天堂亚洲精品| 青青视频观看免费99| 亚洲国产另类久久久精品黑人| 亚洲av成本人无码网站| 四虎永久在线观看免费网站网址| 亚洲区小说区激情区图片区| 亚洲av色香蕉一区二区三区蜜桃| 一级毛片在线观看免费| 国产精品亚洲mnbav网站 | 日韩亚洲变态另类中文| 亚洲日本va一区二区三区| 久久国产乱子伦精品免费一| 亚洲片国产一区一级在线观看| 亚洲色中文字幕在线播放| 69av免费观看| 亚洲av一综合av一区| 色爽黄1000部免费软件下载| 精品国产免费观看| 亚洲国产午夜电影在线入口| 午夜免费福利片观看|