https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109356

            Bug ID: 109356
           Summary: Enhancement idea to provide clearer missing brace line
                    number
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jg at jguk dot org
  Target Milestone: ---

Sometimes due to human error there is a missing brace.
Enhancement idea to provide the missing brace line number. Is that possible?

Godbolt trunk gcc does show there is an error, but doesn't pick out line 5.
Would be great if it could

https://godbolt.org/z/nE13h1r13

<source>:8:2: error: expected '}' before ';' token
    8 | };
      |  ^
<source>:2:1: note: to match this '{'
    2 | {
      | ^
<source>:8:2: error: too many initializers for 'const char* [2]'
    8 | };
      |  ^



static const char * list[][2] =
{
    {"A", "B"},
    {"C", "D"},
    {"E", "F",
    {"G", "H"},
    {"I", "J"}
};

int main()
{
}

Reply via email to