Skip to content

Different output when upgrading from clang 9 to clang 10 #2166

@adrianimboden

Description

@adrianimboden

What is the issue you have?

I just spent quite some time tracking down a bug caused by upgrading the compiler from clang 9.0.1 to clang 10.0. But I am not sure if that is a compiler bug or something else.
But I thought I should share it anyway here.

The following piece of code:

nlohmann::json config = {"config: {"value", {}}};
std::cerr << config.dump() << std::endl;

using clang 9.0.1 produces:

{"config": {"value": {}}}

and using clang 10.0.0 produces:

{"config": {"value": null}}

Which compiler and operating system are you using?

  • Compiler: Clang 9.0.1/10.0.0, C++17, libc++
  • Operating system: Ubuntu 20.04

Which version of the library did you use?

  • [ x ] latest release version 3.7.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions