Why do gcc and NVCC (g++) see two different structure sizes?
I am trying to add CUDA to an existing single threaded C program that was written sometime in the late 90s. To do this I need to mix two languages, C and C++ (nvcc is a c++ compiler). The problem is that the C++ compiler sees a structure as a certain size, while the C compile sees the same structure as a slightly different size. Thats bad. I am really puzzled by this because I can't find a cause for a 4 byte discrepancy. /usr/lib/gcc/i586-suse-linux/4.3/../../../../i586-suse-linux/bin/ld: Warning: size of symbol `tree' changed from 324 in /tmp/ccvx8fpJ.o to 328 in gpu.o My C++ looks like