As the topic suggest I cannot compile the nvidia module with gcc 4.8.1. I have tried to compile it with several different kernels, so it must be a problem with gcc. The reason why I'm using gcc 4.8.1 is because my laptop have a haswell cpu. I used the following stage-3 build which is build and configured to use gcc 4.8.1 for haswell:
https://forums.gentoo.org/viewtopic-p-7343500.html

Are you sure you have tried different kernels? (The version /usr/src/linux/ points to is the important one! At least your linked build log used kernel 3.10 which is unsupported by the current nvidia-drivers... there exists a patch though...)_________________System: AMD FX 8350, 16GB RAM, NVidia GeForce GTX 750 Ti, Asus M5A99X EVO R2.0

* Found sources for kernel version:
* 3.10.3-gentoo-r1
* Gentoo supports kernels which are supported by NVIDIA
* which are limited to the following kernels:
* <sys-kernel/gentoo-sources-3.10
* <sys-kernel/vanilla-sources-3.10
*
* You are free to utilize epatch_user to provide whatever
* support you feel is appropriate, but will not receive
* support as a result of those changes.
*
* Do not file a bug report about this.