cudafe error when using C++11 constructs on RHEL5

I am using CUDA 5.5 in conjunction with gcc 4.7.3 on linux and receive an error from cudafe when using the C++11 override keyword (error is “expected a ;” implying it does not recognize the keyword). The call to cudafe is included below. This same code compiles fine on windows w/ CUDA 5.5.

Are there any known limitations regarding C++11 support in cudafe that exist in linux but not windows?

I considered that it might be possible that cudafe was invoking the wrong compiler (say an earlier version of gcc that doesn’t support override), but I don’t see any calls from cudafe to gcc in the verbose output and the documentation on cudafe is fairly sparse.

cudafe call:

cudafe --m64 --gnu_version=40703 -tused --no_remove_unneeded_entities --device-c --gen_c_file_name “/tmp/tmpxft_00007bfe_00000000-3_test.compute_35.cudafe1.c” --stub_file_name “/tmp/tmpxft_00007bfe_00000000-3_test.compute_35.cudafe1.stub.c” --gen_device_file_name “/tmp/tmpxft_00007bfe_00000000-3_test.compute_35.cudafe1.gpu” --nv_arch “compute_35” --gen_module_id_file --module_id_file_name “/tmp/tmpxft_00007bfe_00000000-2_test.module_id” --include_file_name “tmpxft_00007bfe_00000000-1_test.fatbin.c” “/tmp/tmpxft_00007bfe_00000000-9_test.compute_35.cpp1.ii”

I assume you are referring to the use of a C++11 feature in the host portion of a CUDA program? At present, the use of C++11 features in device code is not supported by the CUDA tool chain.

I checked with the compiler team, and from what I understand, C++11 features that are supported by the host compiler at default settings should work in the host code portion of a .cu file. However, C++11 features that require the use of specific additional compiler flags (e.g. -std=c++11 with g++) to turn them on are not supported. I am not familiar with the extent of default support for C++11 in the various host compilers supported by CUDA and therefore do not know which category the “override” keyword falls into in case of gcc 4.7.3.

For now it seems advisable to move host code using C++11 features into separate .cpp files so it can be processed directly by the host compiler.

C++11 features that are supported by the host compiler at default settings should work in the host code portion of a .cu file.

This is exactly it. It appears that “override” is not supported in gcc 4.7.3 w/o the -std=c++11 flag. Thanks a lot for the help.