首页 > 其他 > 详细

__builtin_constant_p

时间:2014-08-04 21:14:18      阅读:467      评论:0      收藏:0      [点我收藏+]

int __builtin_constant_p (exp);

You can use the built-in function __builtin_constant_p to determine if a value is known to be constant at compile-time and hence that GCC can perform constant-folding on expressions involving that value. The argument of the function is the value to test. The function returns the integer 1 if the argument is known to be a compile-time constant and 0 if it is not known to be a compile-time constant. A return of 0 does not indicate that the value is not a constant, but merely that GCC cannot prove it is a constant with the specified value of the ‘-O‘ option.

 

Constant folding is the process of recognizing and evaluating constant expressions at compile time rather than computing them at runtime.

__builtin_constant_p,布布扣,bubuko.com

__builtin_constant_p

原文:http://www.cnblogs.com/nufangrensheng/p/3890886.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!