This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/63918] New: Error in declaration goto statement


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

            Bug ID: 63918
           Summary: Error in declaration goto statement
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: trivial
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: s22 at bk dot ru

int main() {
    // your code goes here
    goto a1;
    a2:
    a=1;
    goto a3;
    a1:;
    int a=0;
    goto a2;
    a3:
    return 0;
}


Error
prog.c: In function âmainâ:
prog.c:5:2: error: âaâ undeclared (first use in this function)
  a=1;

But declartion before use.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]