__builtin_constant_p version/-Ox Truth Table

From: Daniel Santos
Date: Fri May 04 2012 - 22:45:33 EST


I'm working on some code relies a lot on __builtin_constant_p, which
behaves quite differently in various circumstances (-O levels, versions,
etc.). To avoid any further gotchas, I wrote a small test program &
script, massaged the data a bit in OpenOffice Calc and got a helpful
truth table that I thought was worth sharing.

I initially forgot to do non-struct member char and void pointers, so
that data comes out of the script now, but I don't feel like massaging
it into the speadsheet again, so here they are (hope it's helpful to
somebody else)

Daniel

Attachment: consttest.tar.lzma
Description: application/lzma