12.07.2015 Views

RealView 编译工具编译器参考指南 - ARM Information Center

RealView 编译工具编译器参考指南 - ARM Information Center

RealView 编译工具编译器参考指南 - ARM Information Center

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

编 译 器 特 有 的 功 能示 例__declspec(dllimport) int i;class __declspec(dllimport) X{void f();};另 请 参 阅• 第 4-24 页 的 __declspec(dllexport)4.2.3 __declspec(noinline)__declspec(noinline) 属 性 禁 止 在 函 数 调 用 点 处 内 联 函 数 。注 意此 __declspec 属 性 具 有 等 效 的 函 数 属 性 __attribute__((noinline))。另 请 参 阅• 第 4-63 页 的 #pragma inline, #pragma no_inline• 第 4-35 页 的 __attribute__((noinline))4.2.4 __declspec(noreturn)__declspec(noreturn) 属 性 指 明 函 数 从 不 返 回 值 。注 意此 属 性 具 有 等 效 的 函 数 __attribute((noreturn))。 但 是 , __attribute((noreturn))和 __declspec(noreturn) 的 不 同 之 处 在 于 , 在 编 译 函 数 定 义 时 , 如 果 函 数 到 达 显式 或 隐 式 返 回 , 则 __attribute((noreturn)) 将 被 忽 略 , 同 时 编 译 器 生 成 警 告 消息 。 而 __declspec(noreturn) 不 会 被 忽 略 。用 法可 以 使 用 此 属 性 减 少 调 用 从 不 返 回 值 的 函 数 ( 如 exit()) 所 产 生 的 开 销 。 如 果noreturn 函 数 将 值 返 回 到 其 调 用 方 , 则 该 行 为 是 未 定 义 的 。<strong>ARM</strong> DUI 0348BC Copyright © 2007-2009 <strong>ARM</strong> Limited. All rights reserved. 4-27ID090708Non-Confidential, Unrestricted Access

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!