4.7.3. __builtin_constant_p

This builtin function determines if a value is known to be constant at compile-time.

Note

This builtin function is a GNU compiler extension that is supported by the ARM compiler.

Mode

Supported in GNU mode only.

Syntax

int __builtin_constant_p(...)

Where:

...

is the argument whose value is to be tested.

Return value

__builtin_constant_p 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.

Restrictions

A return value of 0 does not indicate that the value is not a constant, but that the compiler cannot prove it is a constant with the specified value of the -O option.

See also

Copyright © 2007, 2010 ARM Limited. All rights reserved.ARM DUI 0348A
Non-Confidential