-
Notifications
You must be signed in to change notification settings - Fork 781
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compile error: ignoring attributes on template argument #330
Comments
I used a cross-compiler to 5.4.0, and it worked. |
I see these warnings all the time with GCC 6.3 and 7.2 (which is why I don’t build with |
I'm happy for us to fix this warning if someone can explain to me what it's about :) I did a quick research and didn't find much explanations out there about this warning. |
Ha-ha, me too! (And I am a compiler guy :)) |
greatly appreciate your attention. Not sure whether this is bugs in GCC. |
Does it fail when you build with |
Yes, also failed |
I actually just tried linaro toolchains 6.2, 6.3 and 7.2 and didn't get any warnings.
So we disable these. |
I think that these warnings have to do with the attributes on the CL API entrypoints. Because template parameters do not retain the parameter's attributes as they are not part of the name mangling. |
Thanks very much. I will disable these warnings as your suggestion. |
…late parameters warning This is to suppress a bogus warning(and therefore error) on the CI while migrating to Ubuntu 24. See ARM-software/ComputeLibrary#330
…late parameters warning This is to suppress a bogus warning(and therefore error) on the CI while migrating to Ubuntu 24. See ARM-software/ComputeLibrary#330
…late parameters warning This is to suppress a bogus warning(and therefore error) on the CI while migrating to Ubuntu 24. See ARM-software/ComputeLibrary#330
…late parameters warning This is to suppress a bogus warning(and therefore error) on the CI while migrating to Ubuntu 24. See ARM-software/ComputeLibrary#330
…late parameters warning This is to suppress a bogus warning(and therefore error) on the CI while migrating to Ubuntu 24. See ARM-software/ComputeLibrary#330
…late parameters warning This is to suppress a bogus warning(and therefore error) on the CI while migrating to Ubuntu 24. See ARM-software/ComputeLibrary#330
…late parameters warning This is to suppress a bogus warning(and therefore error) on the CI while migrating to Ubuntu 24. See ARM-software/ComputeLibrary#330
I try to compile this library with scons command,
using aarch64-poky-linux-g++ --version
But I got the following error like in OpenCL.h, not sure if this is related to my compiler.
In file included from ./arm_compute/core/CL/CLHelpers.h:27:0,
from src/core/CL/CLHelpers.cpp:24:
./arm_compute/core/CL/OpenCL.h:60:38: error: ignoring attributes on template argument ‘cl_int(cl_program, cl_uint, _cl_device_id* const*, const char*, void ()(cl_program, void), void*) {aka int(_cl_program*, unsigned int, _cl_device_id* const*, const char*, void ()(_cl_program, void*), void*)}’ [-Werror=ignored-attributes]
std::function<decltype(func_name)> func_name##_ptr = nullptr
^
./arm_compute/core/CL/OpenCL.h:62:5: note: in expansion of macro ‘DECLARE_FUNCTION_PTR’
DECLARE_FUNCTION_PTR(clBuildProgram);
^~~~~~~~~~~~~~~~~~~~
./arm_compute/core/CL/OpenCL.h:60:38: error: ignoring attributes on template argument ‘cl_int(cl_command_queue, cl_kernel, cl_uint, const size_t*, const size_t*, const size_t*, cl_uint, _cl_event* const*, _cl_event**) {aka int(_cl_command_queue*, _cl_kernel*, unsigned int, const long unsigned int*, const long unsigned int*, const long unsigned int*, unsigned int, _cl_event* const*, _cl_event**)}’ [-Werror=ignored-attributes]
std::function<decltype(func_name)> func_name##_ptr = nullptr
^
./arm_compute/core/CL/OpenCL.h:63:5: note: in expansion of macro ‘DECLARE_FUNCTION_PTR’
DECLARE_FUNCTION_PTR(clEnqueueNDRangeKernel);
^~~~~~~~~~~~~~~~~~~~
./arm_compute/core/CL/OpenCL.h:60:38: error: ignoring attributes on template argument ‘cl_int(cl_kernel, cl_uint, size_t, const void*) {aka int(_cl_kernel*, unsigned int, long unsigned int, const void*)}’ [-Werror=ignored-attributes]
std::function<decltype(func_name)> func_name##_ptr = nullptr
^
./arm_compute/core/CL/OpenCL.h:64:5: note: in expansion of macro ‘DECLARE_FUNCTION_PTR’
The text was updated successfully, but these errors were encountered: