Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Replace "warning" with "diagnostic", or define "warning" #7730

Open
@Eisenwave

Description

@Eisenwave

In #7728, @frederick-vs-ja pointed out that:

Hmm, the standard wording is currently saying "warning" for many times:

Ok fair point, I've drafted that PR when I was half-asleep after work and didn't find those for some reason. So it seems like (in N5001) we have:

  • 27 occurrences of "warning" in the draft, of which 13 are in normative wording (the rest is comments, #warning, etc.)
  • 134 occurrences of "diagnostic" in the draft, of which ... I'm not going to count lmao.

Unlike warning, "diagnostic" is a defined term [defns.diagnostic]. I think we should replace normative uses of "warning" with "diagnostic". To a casual reader, if we say "warning" in some places, that implies that some other messages are "errors", but the standard never makes that distinction. Even an ill-formed program isn't said to produce an "error message". It's all diagnostics.

To further clarify, I think it's fine to keep code comments such as:

0 = 0;  // error
0 == 0; // warning

We use // error comments quite a bit despite never saying what an "error" is, but those uses aren't normative anyway. If "error" is fine in that context, so is "warning". It just isn't fine in normative wording.

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