在功能参数Static关键字 [英] Static keyword in function parameter

查看:140
本文介绍了在功能参数Static关键字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚发现了一些嵌入式code这个函数的定义:

I've just found this function definition in some embedded code:

float round_float_to_4(static float inputval);

我熟悉的其他用途的静态(全局变量,函数和局部变量),但是这是我第一次看到它作为说明符函数参数。我认为这个力量编译器使用固定的内存位置的 inputval 而不是堆栈?

I'm familiar with other uses for static (global variables, functions and local variables), but this is the first time I see it as specifier for function parameter. I assume that this forces compiler to use fixed memory location for inputval instead of stack?

推荐答案

这是非标准。我猜想同样的事情你,我并不感到惊讶在具有嵌入式目标编译器,扩展的。

This is non standard. I'd guess the same thing as you, and I'm not surprised of such extension in compilers having an embedded target.

这篇关于在功能参数Static关键字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆