Hi -
AFAIK, No: there isn't any command that tells you which version of GCC a kernel was compiled with.
But out of curiousity: *why*?
PS:
One (perhaps useful, perhaps not
) bit of trivia:
When you start compiling your own kernels, you can specify "CONFIG_IKCONFIG_PROC". This will create a file "/proc/config.gz", so you can always see exactly what options were specified in building the kernel.