Skip to content

ODR violation: dropped a const? #43

@havogt

Description

@havogt

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions