相关疑难解决方法(0)

GCC __attribute __((模式(XX))实际上做了什么?

这源于今天早些时候关于bignum库和gcc特定的C语言攻击主题的问题.具体来说,使用了这两个声明:

typedef unsigned int dword_t __attribute__((mode(DI)));
Run Code Online (Sandbox Code Playgroud)

在32位系统和

typedef unsigned int dword_t __attribute__((mode(TI)));
Run Code Online (Sandbox Code Playgroud)

在64位系统上.

我假设这是对C语言的扩展,没有办法实现它在当前(C99)标准中实现的任何目标.

所以我的问题很简单:这个假设是否正确?这些陈述对底层内存有何影响?我认为结果是我2*sizeof(uint32_t)对于dword32位系统和2*sizeof(uint64_t)64位系统,我是否正确?

c attributes c99 bignum

22
推荐指数
1
解决办法
1万
查看次数

标签 统计

attributes ×1

bignum ×1

c ×1

c99 ×1