| ▲ | nickorlow 6 hours ago | ||||||||||||||||||||||||||||||||||||||||
> They can be compile time if the compiler can verify them statically (where they become a noop) This only happens during constant evaluation. For example, the following could be determined statically, but compiles w/o error on gcc int add_nums(int x, int y)
{
}int result_rt = add_nums(-1,-1); // no compile error | |||||||||||||||||||||||||||||||||||||||||
| ▲ | bluGill 6 hours ago | parent [-] | ||||||||||||||||||||||||||||||||||||||||
It compilers on the current gcc version (or at least the one you tested). Future gcc can make it an error. | |||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||