Skip to content

error: declaration of ‘eld::DiagnosticEngine::Severity eld::DiagnosticEngine::State::Severity’ changes meaning of ‘Severity’ #815

@notable-equivalent

Description

@notable-equivalent

In the definition of the struct DiagnosticEngine::State, we have a member variable Severity which shadows a type called Severity, causing a compilation failure.

eld/include/eld/Diagnostics/DiagnosticEngine.h:183:14: error: declaration of ‘eld::DiagnosticEngine::Severity eld::DiagnosticEngine::State::Severity’ changes meaning of ‘Severity’ [-fpermissive]
  183 |     Severity Severity = Severity::None;
      |              ^~~~~~~~

Issue was seen with GCC-9, which may not be a supported compiler for this project, but as far as I'm aware this is against the language standard in general (see https://stackoverflow.com/a/72130091/14013278) so we shouldn't be doing it.

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