<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

    看到內核代碼中有很多地方都使用了#if defined(),可是卻找不到這個東東的定義,主要是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 何克勤 閱讀(2807) 評論(1)  編輯  收藏 所屬分類: C/C++

    FeedBack:
    # re: #if defined()的含義(ZZ)[未登錄]
    2011-11-04 16:43 | jack
    it's usefull   回復  更多評論
      
    主站蜘蛛池模板: 青青草a免费线观a| 日韩中文字幕精品免费一区| 国产一级淫片a免费播放口之| 亚洲一区二区三区免费视频 | 亚洲va中文字幕无码久久 | 日韩免费人妻AV无码专区蜜桃| 久久久青草青青亚洲国产免观 | 日本高清免费不卡视频| 色综合久久精品亚洲国产| 国产真人无遮挡作爱免费视频| 在线观看亚洲专区| 亚洲阿v天堂在线2017免费| 国产成人自产拍免费视频| 亚洲人成人无码网www国产| 久久久久免费视频| 亚洲乱色熟女一区二区三区丝袜| 最近免费中文字幕MV在线视频3| 亚洲一区综合在线播放| 久久久久久久91精品免费观看| 亚洲AV成人影视在线观看| 国产资源免费观看| 中文毛片无遮挡高清免费| 亚洲av色影在线| 黄页网站免费在线观看| 日韩亚洲人成在线综合| 国产亚洲人成网站观看| 午夜国产精品免费观看| 国产亚洲成在线播放va| 亚洲伊人久久精品影院| h视频在线免费看| 亚洲高清乱码午夜电影网| 亚洲性猛交XXXX| 免费在线视频你懂的| 羞羞视频免费观看| 亚洲AV无码乱码国产麻豆穿越 | 在线看片免费人成视久网| 一本色道久久88—综合亚洲精品 | 在线视频网址免费播放| 亚洲成无码人在线观看| 亚洲国产精品一区二区三区久久| 国产成人久久AV免费|