cpp_bindgen icon indicating copy to clipboard operation
cpp_bindgen copied to clipboard

ODR violation: dropped a const?

Open havogt opened this issue 5 years ago • 0 comments

I got the following warning with gcc 9, didn't look into the problem, but could be a problem in cpp_bindgen:

cosmo/dycore/src/dycore/Bindings/dycore_base_bindings_float.h:125:6: warning: ‘gt_tracer_add_metainfo0’ violates the C++ One Definition Rule [-Wodr]
  125 | void gt_tracer_add_metainfo0(gt_handle*, int, char*, int);
      |      ^
cosmo/dycore/src/dycore/Bindings/TracerMetainfoBindings.cpp:24:1: note: type mismatch in parameter 3
   24 | GT_EXPORT_GENERIC_BINDING(4, gt_tracer_add_metainfo, tracer_add_metainfo_impl, (int)(double)(float)(bool)(const char*));
      | ^
cosmo/dycore/src/dycore/Bindings/TracerMetainfoBindings.cpp:24:1: note: type ‘const char’ should match type ‘char’
cosmo/dycore/src/dycore/Bindings/TracerMetainfoBindings.cpp:24:1: note: ‘gt_tracer_add_metainfo0’ was previously declared here

havogt avatar Sep 04 '19 12:09 havogt