Skip to content

Compiling severity.h with gcc-15 fails #3239

@AngryLoki

Description

@AngryLoki

Describe your environment

Reported originally in https://bugs.gentoo.org/946146 for opentelemetry-cpp-1.16.1, but still reproducible with 1.18.0.

Build with gcc-15 fails with:

/var/tmp/portage/dev-cpp/opentelemetry-cpp-1.16.1/work/opentelemetry-cpp-1.16.1/api/include/opentelemetry/logs/severity.h:49:7: error: ‘uint8_t’ does not name a type
   49 | const uint8_t kMaxSeverity = 255;
      |       ^~~~~~~

With some other gcc/clang versions it worked due to transitive includes, but it was very unpredictable (for example is available after inclusion if string_view with libc++, or ostream with libstdc++, but not for gcc-13). Here is a conformance view if you are interested: https://godbolt.org/z/hEs18z8Pd

See linked pull-request with a fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriage/acceptedIndicates an issue or PR is ready to be actively worked on.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions