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.

编 译 器 特 有 的 功 能long long rw[10] __attribute__ ((section ("RW")));/* in ZI section *long long altstack[10] __attribute__ ((section ("STACK"), zero_init));/4.5.7 __attribute__((transparent_union))如 果 将 transparent_union 变 量 属 性 附 加 到 具 有 联 合 类 型 的 函 数 参 数 中 , 则 表 示相 应 自 变 量 可 具 有 任 何 联 合 成 员 的 类 型 , 但 传 递 自 变 量 时 就 好 像 其 类 型 是 第 一个 联 合 成 员 的 类 型 一 样 。注 意C 规 范 规 定 , 如 果 将 联 合 作 为 一 种 类 型 写 入 并 以 另 一 种 类 型 回 读 , 则 返 回 的 值是 未 定 义 的 。 因 此 , 区 分 transparent_union 以 哪 种 类 型 写 入 的 方 法 也 必 须 作 为自 变 量 传 递 。注 意此 变 量 属 性 是 <strong>ARM</strong> 编 译 器 支 持 的 GNU 编 译 器 扩 展 。注 意也 可 以 在 typedef 上 将 此 属 性 用 于 联 合 数 据 类 型 。 在 这 种 情 况 下 , 它 应 用 于 所 有该 类 型 的 函 数 参 数 。模 式仅 在 GNU 模 式 下 支 持 。示 例typedef union{int myint;float myfloat;} transparent_union_t;void Variable_Attributes_transparent_union_0(transparent_union_t aUnion__attribute__ ((transparent_union))){static int aStatic;aStatic +=aUnion.myint;}void Variable_Attributes_transparent_union_1(){int aLocal =0;<strong>ARM</strong> DUI 0348BC Copyright © 2007-2009 <strong>ARM</strong> Limited. All rights reserved. 4-51ID090708Non-Confidential, Unrestricted Access

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

Saved successfully!

Ooh no, something went wrong!