Skip to content

Cannot inline due to function body not available #1851

@undisputed-seraphim

Description

@undisputed-seraphim

OS: Debian 11
Compiler: gcc 10.2.1-6
simdjson tag: v2.0.4
simdjson compile flags: -DSIMDJSON_SANITIZE=ON -DSIMDJSON_SANITIZE_UNDEFINED=ON -DSIMDJSON_DISABLE_DEPRECATED_API=ON -DSIMDJSON_EXCEPTIONS=OFF -DSIMDJSON_AVX512_ALLOWED=OFF

Sample reproduction:

#include <simdjson.h>
int main() {
        simdjson::error_code ec;
        simdjson::dom::object obj;
        for (const auto& field : obj) {
                const auto value = field.value.get_object().value(ec);
        }
}

Error:

/home/user/.usr/include/simdjson.h:2382:35: error: inlining failed in call to ‘always_inline’ ‘const T& simdjson::internal::simdjson_result_base<T>::value(simdjson::error_code&) const & noexcept [with T = simdjson::dom::object]’: function body not available
 2382 |   simdjson_really_inline const T &value(error_code &error) const & noexcept;
      |                                   ^~~~~

Notes: Did not encounter this problem when compiling with fewer flags

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions