http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54631
Bug #: 54631 Summary: vxworks.c fails to compile Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target AssignedTo: unassig...@gcc.gnu.org ReportedBy: r...@verizon.net I just pulled in the latest changes, and vxworks.c no longer compiles. The error is at bottom. I think this has to do with the upgrade to C++. The code in question does this: elt = VEC_quick_push(constructor_elt, v, NULL); The problem with this is that NULL is not convertible to const constructor_elt &. I think that with the old C API this would just construct a new object, but that doesn't work anymore. Changing the code to construct the object first and then add it to the vector should work, but I don't know enough about the code to be sure. As a question, should these files be changed to use the C++ API? Or should they stick with pretending that they're straight C? Thanks! Robert Mason ../../gcc/gcc/config/vxworks.c: In function ‘tree_node* vxworks_emutls_var_init(tree, tree, tree)’: ../../gcc/gcc/config/vxworks.c:105:9: error: no matching function for call to ‘vec_t<constructor_elt_d>::quick_push(NULL, const char [31], int, const char [24])’ ../../gcc/gcc/config/vxworks.c:105:9: note: candidate is: In file included from ../../gcc/gcc/tree.h:29:0, from ../../gcc/gcc/config/vxworks.c:29: ../../gcc/gcc/vec.h:783:1: note: T* vec_t<T>::quick_push(const T&, const char*, unsigned int, const char*) [with T = constructor_elt_d] ../../gcc/gcc/vec.h:783:1: note: no known conversion for argument 1 from ‘long int’ to ‘const constructor_elt_d&’ ../../gcc/gcc/config/vxworks.c:109:9: error: no matching function for call to ‘vec_t<constructor_elt_d>::quick_push(NULL, const char [31], int, const char [24])’ ../../gcc/gcc/config/vxworks.c:109:9: note: candidate is: In file included from ../../gcc/gcc/tree.h:29:0, from ../../gcc/gcc/config/vxworks.c:29: ../../gcc/gcc/vec.h:783:1: note: T* vec_t<T>::quick_push(const T&, const char*, unsigned int, const char*) [with T = constructor_elt_d] ../../gcc/gcc/vec.h:783:1: note: no known conversion for argument 1 from ‘long int’ to ‘const constructor_elt_d&’ ../../gcc/gcc/config/vxworks.c:114:9: error: no matching function for call to ‘vec_t<constructor_elt_d>::quick_push(NULL, const char [31], int, const char [24])’ ../../gcc/gcc/config/vxworks.c:114:9: note: candidate is: In file included from ../../gcc/gcc/tree.h:29:0, from ../../gcc/gcc/config/vxworks.c:29: ../../gcc/gcc/vec.h:783:1: note: T* vec_t<T>::quick_push(const T&, const char*, unsigned int, const char*) [with T = constructor_elt_d] ../../gcc/gcc/vec.h:783:1: note: no known conversion for argument 1 from ‘long int’ to ‘const constructor_elt_d&’ make[2]: *** [vxworks.o] Error 1 make[1]: *** [all-gcc] Error 2 make: *** [all] Error 2