码迷,mamicode.com
首页 > 其他好文 > 详细

__builtin_constant_p

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

标签:http   strong   io   for   ar   cti   html   htm   

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   strong   io   for   ar   cti   html   htm   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!